<controls:DockPanel
    x:Class="Pixeval.Controls.SpotlightItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:CommunityToolkit.WinUI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Pixeval.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:pixeval="using:Pixeval.AppManagement"
    LastChildFill="False"
    mc:Ignorable="d">
    <controls:ConstrainedBox controls:DockPanel.Dock="Top" AspectRatio="40:21">
        <local:LazyImage CornerRadius="0" Source="{x:Bind ViewModel.ThumbnailSource, Mode=OneWay}" />
    </controls:ConstrainedBox>
    <controls:DockPanel
        Padding="20"
        controls:DockPanel.Dock="Top"
        LastChildFill="False"
        VerticalSpacing="10">
        <TextBlock
            controls:DockPanel.Dock="Bottom"
            Style="{StaticResource SubtitleTextBlockStyle}"
            Text="{x:Bind ViewModel.Entry.Title, Mode=OneWay}"
            TextTrimming="WordEllipsis" />
        <ContentPresenter
            Padding="5,0"
            controls:DockPanel.Dock="Left"
            Background="{x:Bind GetBackgroundBrush(ViewModel.Entry.Category), Mode=OneWay}"
            CornerRadius="{StaticResource ControlCornerRadius}">
            <TextBlock Text="{x:Bind ViewModel.Entry.SubcategoryLabel, Mode=OneWay}" />
        </ContentPresenter>
        <TextBlock
            controls:DockPanel.Dock="Right"
            Foreground="DarkGray"
            Text="{x:Bind local:C.CultureDateTimeOffsetDateFormatter(ViewModel.Entry.PublishDate, pixeval:AppSettings.CurrentCulture), Mode=OneWay}" />
    </controls:DockPanel>
</controls:DockPanel>
