<UserControl x:Class="Vulnerator.View.UI.ThemeView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
             xmlns:Converters="clr-namespace:Vulnerator.View.Converter"
             xmlns:GridExtra="clr-namespace:SourceChord.GridExtra;assembly=GridExtra.Wpf"
             xmlns:IconPacks="http://metro.mahapps.com/winfx/xaml/iconpacks"
             xmlns:LiveCharts="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
             xmlns:ViewHelper="clr-namespace:Vulnerator.View.ViewHelper"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:dat="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
             xmlns:diag="clr-namespace:System.Diagnostics;assembly=WindowsBase"
             xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
             xmlns:local="clr-namespace:Vulnerator.View.UI"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:scm="clr-namespace:System.ComponentModel;assembly=WindowsBase"
             xmlns:v="clr-namespace:Vulnerator.View"
             xmlns:vm="clr-namespace:Vulnerator.ViewModel"
             HorizontalAlignment="Stretch"
             VerticalAlignment="Stretch"
             d:DesignWidth="800"
             DataContext="{Binding Theme, Source={StaticResource Locator}}"
             mc:Ignorable="d">
    <Grid Background="{DynamicResource WindowBackgroundBrush}">
        <ScrollViewer Margin="5,0,5,5"
                      CanContentScroll="True"
                      HorizontalScrollBarVisibility="Disabled"
                      VerticalScrollBarVisibility="Auto">
            <StackPanel>
                <Label Content="Base Theme"
                       Style="{StaticResource TopLevelHeaderStyle}" />
                <ViewHelper:CommandEnabledComboBox MinWidth="250"
                                                   Margin="5,0"
                                                   HorizontalAlignment="Left"
                                                   VerticalAlignment="Top"
                                                   Controls:ControlsHelper.CornerRadius="3"
                                                   Command="{Binding ChangeThemeCommand}"
                                                   DisplayMemberPath="DisplayName"
                                                   ItemsSource="{Binding Themes}"
                                                   SelectedItem="{Binding SelectedTheme}"
                                                   Style="{DynamicResource MetroComboBox}" />
                <Label Content="Accent Color"
                       Style="{StaticResource TopLevelHeaderStyle}" />
                <Grid>
                    <GridExtra:ResponsiveGrid>
                        <Button x:Name="pink"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFF472D0"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Pink" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Pink" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="magenta"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFD80073"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Magenta" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Magenta" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="crimson"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFA20025"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Crimson" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Crimson" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="red"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFE51400"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Red" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Red" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="sienna"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFA0522D"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Sienna" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Sienna" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="brown"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF825A2C"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Brown" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Brown" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="orange"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFFA6800"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Orange" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Orange" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="amber"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFF0A30A"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Amber" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Amber" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="yellow"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFE3C800"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Yellow" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Yellow" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="taupe"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF87794E"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Taupe" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Taupe" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="olive"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF6D8764"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Olive" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Olive" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="lime"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFA4C400"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Lime" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Lime" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="green"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF60A917"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Green" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Green" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="emerald"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF008A00"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Emerald" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Emerald" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="teal"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF00ABA9"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Teal" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Teal" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="cyan"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF1BA1E2"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Cyan" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Cyan" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="steel"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF647687"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Steel" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Steel" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="cobalt"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF0050EF"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Cobalt" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Cobalt" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="indigo"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF6A00FF"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Indigo" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Indigo" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="violet"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FFAA00FF"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Violet" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Violet" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                        <Button x:Name="mauve"
                                Command="{Binding ChangeAccentCommand}"
                                CommandParameter="{Binding RelativeSource={RelativeSource Self}, Path=Name}"
                                Style="{StaticResource ResponsiveGridThemeButtonStyle}">
                            <Button.ContentTemplate>
                                <DataTemplate>
                                    <StackPanel Width="Auto"
                                                HorizontalAlignment="Left"
                                                VerticalAlignment="Top">
                                        <Rectangle Fill="#FF76608A"
                                                   Style="{StaticResource ThemeSwatchStyle}"
                                                   ToolTip="Mauve" />
                                        <Label HorizontalAlignment="Center"
                                               Content="Mauve" />
                                    </StackPanel>
                                </DataTemplate>
                            </Button.ContentTemplate>
                        </Button>
                    </GridExtra:ResponsiveGrid>
                </Grid>
                <Label Content="Sample Swatches"
                       Style="{StaticResource TopLevelHeaderStyle}" />
                <Grid>
                    <GridExtra:ResponsiveGrid>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource HighlightBrush}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Highlight Color" />
                            <Label HorizontalAlignment="Center"
                                   Content="Highlight Color" />
                        </StackPanel>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource AccentBaseColorBrush}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Accent Base Color" />
                            <Label HorizontalAlignment="Center"
                                   Content="Accent Base Color" />
                        </StackPanel>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource AccentColorBrush}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Accent Color 1" />
                            <Label HorizontalAlignment="Center"
                                   Content="Accent Color 1" />
                        </StackPanel>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource AccentColorBrush2}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Accent Color 2" />
                            <Label HorizontalAlignment="Center"
                                   Content="Accent Color 2" />
                        </StackPanel>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource AccentColorBrush3}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Accent Color 3" />
                            <Label HorizontalAlignment="Center"
                                   Content="Accent Color 3" />
                        </StackPanel>
                        <StackPanel Style="{StaticResource ResponsiveGridThemeStackPanelStyle}">
                            <Rectangle Fill="{DynamicResource AccentColorBrush4}"
                                       Style="{StaticResource ThemeSwatchStyle}"
                                       ToolTip="Accent Color 4" />
                            <Label HorizontalAlignment="Center"
                                   Content="Accent Color 4" />
                        </StackPanel>
                    </GridExtra:ResponsiveGrid>
                </Grid>
            </StackPanel>
        </ScrollViewer>
    </Grid>
</UserControl>
