<UserControl x:Class="FModel.Views.Resources.Controls.ListExplorer.FolderRow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:vm="clr-namespace:FModel.ViewModels"
             xmlns:converters="clr-namespace:FModel.Views.Resources.Converters"
             xmlns:adonisUi="clr-namespace:AdonisUI;assembly=AdonisUI"
             mc:Ignorable="d"
             d:DesignHeight="32"
             d:DesignWidth="900"
             d:DataContext="{d:DesignInstance Type=vm:TreeItem, IsDesignTimeCreatable=False}">
    <Grid Height="32"
          Margin="8,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{StaticResource ExplorerNameColumn}" />
            <ColumnDefinition Width="{StaticResource ExplorerTypeColumn}" />
            <ColumnDefinition Width="{StaticResource ExplorerDetailsColumn}" />
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Column="0"
                    Orientation="Horizontal"
                    VerticalAlignment="Center">
            <Grid Width="20"
                  Height="20"
                  Margin="0 0 8 0">
                <Viewbox>
                    <Canvas Width="128"
                            Height="128">
                        <Canvas.Resources>
                            <LinearGradientBrush x:Key="FolderTabGradient"
                                                 StartPoint="0,0"
                                                 EndPoint="0,1">
                                <GradientStop Color="#FFE8C480"
                                              Offset="0" />
                                <GradientStop Color="#FFD9AA63"
                                              Offset="1" />
                            </LinearGradientBrush>
                            <LinearGradientBrush x:Key="FolderBodyGradient"
                                                 StartPoint="0,0"
                                                 EndPoint="0,1">
                                <GradientStop Color="#FFF3D9A4"
                                              Offset="0" />
                                <GradientStop Color="#FFE5BD77"
                                              Offset="1" />
                            </LinearGradientBrush>
                            <SolidColorBrush x:Key="FolderOutlineBrush"
                                             Color="#D8A360" />
                        </Canvas.Resources>
                        <Path Fill="{StaticResource FolderTabGradient}"
                              Stroke="{StaticResource FolderOutlineBrush}"
                              StrokeThickness="2"
                              Data="M20 34 H54 L62 46 H108 C112 46 115 49 115 53 V60 H13 V45 C13 39 16 34 20 34 Z" />
                        <Path Fill="{StaticResource FolderBodyGradient}"
                              Stroke="{StaticResource FolderOutlineBrush}"
                              StrokeThickness="2"
                              Data="M13 60 H115 V104 C115 110 110 115 104 115 H24 C18 115 13 110 13 104 Z" />
                    </Canvas>
                </Viewbox>
            </Grid>
            <TextBlock Text="{Binding Header}"
                       VerticalAlignment="Center"
                       FontSize="12"
                       FontWeight="DemiBold"
                       TextTrimming="CharacterEllipsis"
                       Foreground="{DynamicResource {x:Static adonisUi:Brushes.ForegroundBrush}}" />
        </StackPanel>
        <TextBlock Grid.Column="1"
                   Text="Folder"
                   VerticalAlignment="Center"
                   FontSize="12"
                   Foreground="{DynamicResource {x:Static adonisUi:Brushes.DisabledForegroundBrush}}" />
        <StackPanel Grid.Column="2"
                    Orientation="Horizontal"
                    HorizontalAlignment="Right"
                    VerticalAlignment="Center">
            <TextBlock Text="{Binding Folders.Count, StringFormat={}{0} folders}"
                       FontSize="12"
                       Foreground="{DynamicResource {x:Static adonisUi:Brushes.DisabledForegroundBrush}}" />
            <TextBlock Text=", "
                       FontSize="12"
                       Foreground="{DynamicResource {x:Static adonisUi:Brushes.DisabledForegroundBrush}}" />
            <TextBlock Text="{Binding AssetsList.Assets.Count, StringFormat={}{0} assets}"
                       FontSize="12"
                       Foreground="{DynamicResource {x:Static adonisUi:Brushes.DisabledForegroundBrush}}" />
        </StackPanel>
    </Grid>
</UserControl>
