<Application x:Class="ModernFlyouts.App"
             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:ui="http://schemas.modernwpf.com/2019"
             xmlns:localui="clr-namespace:ModernFlyouts.UI"
             xmlns:local="clr-namespace:ModernFlyouts"
             xmlns:converters="clr-namespace:ModernFlyouts.Converters"
             mc:Ignorable="d"
             ShutdownMode="OnExplicitShutdown">
    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ui:ThemeResources>
                    <ui:ThemeResources.ThemeDictionaries>
                        <ResourceDictionary x:Key="Light" ui:ThemeDictionary.Key="Light" local:ToolkitThemeDictionary.Key="Light">
                            <SolidColorBrush x:Key="FlyoutBackground" Color="#EFEFEF" />
                        </ResourceDictionary>

                        <ResourceDictionary x:Key="Dark" ui:ThemeDictionary.Key="Dark" local:ToolkitThemeDictionary.Key="Dark">
                            <SolidColorBrush x:Key="FlyoutBackground" Color="#222222" />
                        </ResourceDictionary>

                        <ResourceDictionary x:Key="HighContrast" ui:ThemeDictionary.Key="HighContrast" local:ToolkitThemeDictionary.Key="HighContrast">
                            <SolidColorBrush x:Key="FlyoutBackground" Color="{ui:ThemeResource SystemColorWindowColor}" />
                        </ResourceDictionary>
                    </ui:ThemeResources.ThemeDictionaries>
                </ui:ThemeResources>
                <ui:XamlControlsResources />
                <ResourceDictionary Source="Styles/Button.xaml" />
                <ResourceDictionary Source="Styles/ToggleButton.xaml" />
            </ResourceDictionary.MergedDictionaries>

            <converters:IndexToVisibilityConverter x:Key="IndexToVisibilityConverter" />
            <converters:TextToTooltipEnabledConverter x:Key="TextToTooltipEnabledConverter" />
            <converters:ScrollButtonVisibilityConverter x:Key="ScrollButtonVisibilityConverter" />
            <converters:EnumToLocalizedStringConverter x:Key="EnumToLocalizedStringConverter" />
            <converters:InvertBooleanToVisibilityConverter x:Key="InvertBooleanToVisibilityConverter" />
            <BooleanToVisibilityConverter x:Key="BooleanToVisibilityConverter" />

            <converters:PlayPauseButtonTooltipConverter x:Key="PlayPauseButtonTooltipConverter" />
            <converters:RepeatButtonTooltipConverter x:Key="RepeatButtonTooltipConverter" />
            <converters:ShuffleButtonTooltipConverter x:Key="ShuffleButtonTooltipConverter" />

            <converters:PlayPauseButtonGlyphConverter x:Key="PlayPauseButtonGlyphConverter" />
            <converters:RepeatButtonGlyphConverter x:Key="RepeatButtonGlyphConverter" />

            <converters:RepeatButtonIsCheckedConverter x:Key="RepeatButtonIsCheckedConverter" />

            <converters:TimeSpanToNumberConverter x:Key="TimeSpanToNumberConverter" />
            <converters:TimeSpanToStringConverter x:Key="TimeSpanToStringConverter" />
            
            <CornerRadius x:Key="FlyoutCornerRadius">8</CornerRadius>
            <x:Static x:Key="FlyoutWidth" Member="localui:UIManager.FlyoutWidth" />
            <x:Static x:Key="DefaultSessionControlHeight" Member="localui:UIManager.DefaultSessionControlHeight" />

            <DataTemplate x:Key="LocalizedEnumItemTemplate">
                <TextBlock Text="{Binding Converter={StaticResource EnumToLocalizedStringConverter}}" />
            </DataTemplate>
        </ResourceDictionary>
    </Application.Resources>
</Application>
