<?xml version="1.0" encoding="utf-8" ?>
<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:RodelAgent.UI.Controls"
    xmlns:ext="using:RodelAgent.UI.Extensions"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:RodelAgent.UI.Controls.Items">

    <Style TargetType="local:AudioModelCard">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AudioModelCard">
                    <Grid
                        Padding="16,8,8,8"
                        Background="{ThemeResource CardBackgroundFillColorDefaultBrush}"
                        CornerRadius="{StaticResource ControlCornerRadius}">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>
                        <TextBlock
                            VerticalAlignment="Center"
                            Style="{StaticResource BodyStrongTextBlockStyle}"
                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Name}"
                            TextTrimming="CharacterEllipsis"
                            TextWrapping="NoWrap" />

                        <TextBlock
                            Grid.Row="1"
                            Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                            Style="{StaticResource BodyTextBlockStyle}"
                            Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Id}"
                            TextTrimming="CharacterEllipsis"
                            TextWrapping="NoWrap" />
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="SessionAudioModelCardStyle" TargetType="local:AudioModelCard">
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="local:AudioModelCard">
                    <controls:CardPanel
                        x:Name="RootCard"
                        MinWidth="260"
                        AutomationProperties.Name="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Name}"
                        Background="Transparent"
                        IsChecked="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.IsSelected}">
                        <Grid Margin="12,8" ColumnSpacing="8">
                            <TextBlock
                                HorizontalAlignment="Left"
                                VerticalAlignment="Center"
                                Text="{Binding RelativeSource={RelativeSource Mode=TemplatedParent}, Path=ViewModel.Name}"
                                TextTrimming="CharacterEllipsis" />
                        </Grid>
                    </controls:CardPanel>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>
