<Application xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             x:Class="ClaudeDo.App.App"
             xmlns:local="using:ClaudeDo.App"
             xmlns:converters="using:ClaudeDo.Ui.Converters"
             RequestedThemeVariant="Dark">

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceInclude Source="avares://ClaudeDo.Ui/Design/Tokens.axaml" />
                <ResourceInclude Source="avares://ClaudeDo.Ui/Views/Controls/ModalShell.axaml" />
            </ResourceDictionary.MergedDictionaries>

            <!-- Converters -->
            <converters:NotNullToBoolConverter x:Key="NotNullToBool"/>
            <converters:StrikeIfTrueConverter  x:Key="StrikeIfTrue"/>
            <converters:EqStatusConverter      x:Key="EqStatus"/>
            <converters:UpperCaseConverter     x:Key="UpperCase"/>
            <converters:IconKeyConverter       x:Key="IconKey"/>
            <converters:DotBrushConverter          x:Key="DotBrush"/>
            <converters:BoolToItalicConverter      x:Key="BoolToItalic"/>
            <converters:BoolToDraftOpacityConverter x:Key="BoolToDraftOpacity"/>

        </ResourceDictionary>
    </Application.Resources>

    <Application.DataTemplates>
        <local:ViewLocator/>
    </Application.DataTemplates>

    <Application.Styles>
        <FluentTheme />
        <StyleInclude Source="avares://AvaloniaEdit/Themes/Fluent/AvaloniaEdit.xaml" />
        <StyleInclude Source="avares://ClaudeDo.Ui/Design/IslandStyles.axaml" />
        <!-- Global defaults: every Window inherits Inter Tight + body size.
             Controls that need mono opt in via their own class/style. -->
        <Style Selector="Window">
            <Setter Property="FontFamily" Value="{DynamicResource SansFont}" />
            <Setter Property="FontSize" Value="{DynamicResource FontSizeBody}" />
            <Setter Property="Foreground" Value="{DynamicResource TextBrush}" />
        </Style>
        <Style Selector="ListBoxItem:selected /template/ ContentPresenter">
            <Setter Property="Background" Value="{DynamicResource AccentGlowBrush}"/>
        </Style>
        <Style Selector="ListBoxItem:pointerover /template/ ContentPresenter">
            <Setter Property="Background" Value="{DynamicResource AccentSoftBrush}"/>
        </Style>
        <Style Selector="ListBoxItem:selected:pointerover /template/ ContentPresenter">
            <Setter Property="Background" Value="{DynamicResource AccentGlowBrush}"/>
        </Style>
    </Application.Styles>
</Application>