<Styles
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:interactions="clr-namespace:FileTime.Core.Interactions;assembly=FileTime.Core.Abstraction">
    <Styles.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceInclude Source="avares://FileTime.GuiApp.App/Resources/Converters.axaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Styles.Resources>

    <FluentTheme />

    <Style Selector="TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}" />
        <Setter Property="FontSize" Value="16" />
    </Style>
    <Style Selector="TextBlock.SmallText">
        <Setter Property="FontSize" Value="12" />
    </Style>
    <Style Selector="TextBlock.ExtraSmallText">
        <Setter Property="FontSize" Value="11" />
    </Style>
    <Style Selector="TextBlock.ErrorText">
        <Setter Property="Foreground" Value="{DynamicResource ErrorBrush}" />
    </Style>
    <Style Selector="TextBox">
        <Setter Property="Foreground" Value="{DynamicResource ForegroundBrush}" />
        <Setter Property="Background" Value="{DynamicResource ContainerBackgroundBrush}" />
    </Style>
    <Style Selector="ListBox.ContentListView">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>
    <Style Selector="ListBox.ContentListView &gt; ListBoxItem">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
        <Setter Property="ContextMenu">
            <ContextMenu ItemsSource="{Binding Converter={StaticResource ContextMenuGenerator}}" />
        </Setter>
    </Style>

    <Style Selector="ListBox.CommandPalette">
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>
    <Style Selector="ListBox.CommandPalette &gt; ListBoxItem">
        <Setter Property="Margin" Value="0" />
        <Setter Property="Padding" Value="0" />
        <Setter Property="Background" Value="Transparent" />
        <Setter Property="HorizontalContentAlignment" Value="Stretch" />
        <Setter Property="HorizontalAlignment" Value="Stretch" />
    </Style>
    <Style Selector="ListBox.CommandPalette &gt; ListBoxItem[IsSelected=true] TextBlock">
        <Setter Property="Foreground" Value="{DynamicResource SelectedItemForegroundBrush}" />
    </Style>

    <Style Selector="Grid.SidebarContainerPresenter">
        <Setter Property="Cursor" Value="Hand" />
        <Setter Property="Background" Value="#01000000" />
    </Style>

    <Style Selector="Grid.SidebarContainerPresenter:pointerover">
        <Setter Property="Background" Value="{DynamicResource AppBackgroundColor}" />
    </Style>

    <Style Selector="Grid.IconButton">
        <Setter Property="Background" Value="#01000000" />
        <Setter Property="Width" Value="36" />
        <Setter Property="Height" Value="36" />
        <Setter Property="Cursor" Value="Hand" />
    </Style>
    <Style Selector="Grid.IconButton:pointerover">
        <Setter Property="Background" Value="{DynamicResource AppBackgroundColor}" />
    </Style>

    <Style Selector="TextBlock.PathPresenterItem:pointerover">
        <Setter Property="TextDecorations" Value="Underline" />
        <Setter Property="Cursor" Value="Hand" />
    </Style>

    <Style Selector="Border.SelectedTimelineCommand">
        <Setter Property="BorderBrush" Value="{DynamicResource ForegroundBrush}" />
    </Style>

    <Style Selector="ListBox.RadioButtonListBox">
        <Setter Property="BorderBrush" Value="Transparent" />
        <Setter Property="Background" Value="Transparent" />
    </Style>
    <Style Selector="ListBox.RadioButtonListBox ListBoxItem">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate>
                    <Border>
                        <RadioButton
                            VerticalAlignment="Center"
                            Foreground="{DynamicResource ForegroundBrush}"
                            IsChecked="{Binding Path=IsSelected, RelativeSource={RelativeSource TemplatedParent}, Mode=TwoWay}">
                            <TextBlock
                                x:DataType="interactions:IOptionElement"
                                Text="{Binding Text}" />
                        </RadioButton>
                    </Border>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style Selector="Image.LoadingAnimation">
        <Style.Animations>
            <Animation
                Easing="QuadraticEaseInOut"
                IterationCount="INFINITE"
                Duration="0:0:2">
                <KeyFrame Cue="0%">
                    <Setter Property="RotateTransform.Angle" Value="45" />
                </KeyFrame>
                <KeyFrame Cue="100%">
                    <Setter Property="RotateTransform.Angle" Value="405" />
                </KeyFrame>
            </Animation>
        </Style.Animations>
    </Style>

    <Style Selector="Border.SelectedTimelineCommand">
        <Setter Property="BorderBrush" Value="{DynamicResource ForegroundBrush}" />
    </Style>
</Styles>