<controls:MaterialWindow x:ClassModifier="internal"
                         x:Class="Artemis.UI.Shared.Screens.Exceptions.ExceptionView"
                         xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                         xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                         xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
                         xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
                         xmlns:controls="clr-namespace:MaterialDesignExtensions.Controls;assembly=MaterialDesignExtensions"
                         xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
                         xmlns:exceptions="clr-namespace:Artemis.UI.Shared.Screens.Exceptions"
                         xmlns:avalonedit="http://icsharpcode.net/sharpdevelop/avalonedit"
                         xmlns:s="https://github.com/canton7/Stylet"
                         mc:Ignorable="d"
                         Title="Exception | Artemis"
                         Background="{DynamicResource MaterialDesignPaper}"
                         FontFamily="pack://application:,,,/MaterialDesignThemes.Wpf;component/Resources/Roboto/#Roboto"
                         UseLayoutRounding="True"
                         Width="800"
                         Height="800"
                         d:DesignHeight="800"
                         d:DesignWidth="800"
                         d:DataContext="{d:DesignInstance exceptions:ExceptionViewModel}">
    <DockPanel>
        <controls:AppBar Type="Dense" Title="{Binding Header, Mode=OneTime}" DockPanel.Dock="Top" Margin="-18 0 0 0" ShowShadow="False">
            <controls:AppBar.AppIcon>
                <materialDesign:PackIcon Kind="ErrorOutline" Width="20" Height="28" />
            </controls:AppBar.AppIcon>
        </controls:AppBar>

        <Grid>
            <Grid Margin="15">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="*" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>

                <materialDesign:Card Grid.Row="0" Grid.ColumnSpan="2" Margin="0 0 0 5">
                    <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto" Margin="16">
                        <TextBox Text="{Binding Exception, Mode=OneTime}"
                                 AcceptsReturn="True"
                                 IsReadOnly="True"
                                 FontFamily="Consolas"
                                 FontSize="12"
                                 materialDesign:TextFieldAssist.UnderlineBrush="Transparent"
                                 BorderThickness="0" />
                    </ScrollViewer>
                </materialDesign:Card>

                <TextBlock Grid.Row="1" Grid.Column="0" TextWrapping="Wrap" Margin="0 0 5 0" VerticalAlignment="Center">
                    <materialDesign:PackIcon Kind="Text" Margin="0 0 0 -3" />
                    When reporting errors please don't take a screenshot of the error, instead copy the text, thanks!
                </TextBlock>
                <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0 5 0 0">
                    <Button Style="{StaticResource MaterialDesignOutlinedButton}" Command="{s:Action CopyException}" Width="150" Margin="0 0 5 0">
                        COPY EXCEPTION
                    </Button>
                    <Button Style="{StaticResource MaterialDesignFlatMidBgButton}" Command="{s:Action Close}" Width="150" Margin="5 0 0 0">
                        CLOSE
                    </Button>
                </StackPanel>
            </Grid>
            <materialDesign:Snackbar MessageQueue="{Binding MessageQueue}"></materialDesign:Snackbar>
        </Grid>
    </DockPanel>
</controls:MaterialWindow>