<controls:NexusWindow x:Class="NexusShell.Controls.Dialogs.NexusOpenWithDialogWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:controls="clr-namespace:NexusShell.Controls"
        Title="Nexus — Åbn med"
        Width="460" Height="420"
        MinWidth="400" MinHeight="360"
        WindowStartupLocation="CenterOwner"
        ResizeMode="NoResize"
        ShowInTaskbar="False"
        AppTitle="Åbn med"
        AppSubtitle="Vælg Nexus-app"
        IconData="M8,6 L18,12 L8,18 Z"
        ShowSideNav="False"
        ShowChromeButtons="True">
    <controls:NexusWindow.MainContent>
        <Grid Margin="20">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="Auto"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="Auto"/>
            </Grid.RowDefinitions>
            <TextBlock x:Name="TitleText" Text="Åbn med" Foreground="#FFFFFF" FontSize="16" FontWeight="SemiBold" Margin="0,0,0,6"/>
            <TextBlock Grid.Row="1" x:Name="FileNameText" Foreground="#8CA3C7" FontSize="12" TextWrapping="Wrap" Margin="0,0,0,14"/>
            <ListBox Grid.Row="2" x:Name="AppList" BorderThickness="0" Background="Transparent"
                     SelectionChanged="AppList_OnSelectionChanged">
                <ListBox.ItemContainerStyle>
                    <Style TargetType="ListBoxItem">
                        <Setter Property="Padding" Value="0"/>
                        <Setter Property="Margin" Value="0,0,0,8"/>
                        <Setter Property="HorizontalContentAlignment" Value="Stretch"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="ListBoxItem">
                                    <Border x:Name="Root" CornerRadius="12" Padding="12,10"
                                            Background="#12081428" BorderBrush="#2200D9FF" BorderThickness="1" Cursor="Hand">
                                        <ContentPresenter/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsSelected" Value="True">
                                            <Setter TargetName="Root" Property="Background" Value="#338A4FFF"/>
                                            <Setter TargetName="Root" Property="BorderBrush" Value="#7700D9FF"/>
                                        </Trigger>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter TargetName="Root" Property="Background" Value="#1800D9FF"/>
                                        </Trigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </ListBox.ItemContainerStyle>
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <StackPanel Orientation="Horizontal">
                            <Path Data="{Binding IconPath}" Stroke="#00D9FF" StrokeThickness="1.6" Fill="Transparent"
                                  Width="20" Height="20" Stretch="Uniform" Margin="0,0,12,0" VerticalAlignment="Center"/>
                            <StackPanel VerticalAlignment="Center">
                                <TextBlock Text="{Binding Label}" Foreground="#FFFFFF" FontSize="14" FontWeight="SemiBold"/>
                                <TextBlock Text="{Binding Description}" Foreground="#8CA3C7" FontSize="11" Margin="0,2,0,0"/>
                            </StackPanel>
                        </StackPanel>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            </ListBox>
            <StackPanel Grid.Row="3" Orientation="Horizontal" HorizontalAlignment="Right" Margin="0,14,0,0">
                <Button Content="Annuller" Width="100" Height="38" Margin="0,0,10,0" Click="Cancel_Click"
                        Background="#14081428" Foreground="#E8F0FF" BorderBrush="#33FFFFFF" BorderThickness="1" Cursor="Hand"/>
                <Button x:Name="OpenButton" Content="Åbn" Width="100" Height="38" Click="Open_Click" IsDefault="True" IsEnabled="False"
                        Background="#668A4FFF" Foreground="#FFFFFF" BorderBrush="#8800D9FF" BorderThickness="1" Cursor="Hand"/>
            </StackPanel>
        </Grid>
    </controls:NexusWindow.MainContent>
</controls:NexusWindow>
