<?xml version="1.0" encoding="utf-8" ?>
<local:MomentCardPresenter
    x:Class="BiliCopilot.UI.Controls.Components.FullMomentPresenter"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:local="using:BiliCopilot.UI.Controls.Components"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:moment="using:BiliCopilot.UI.Controls.Moment"
    mc:Ignorable="d">

    <Grid Padding="12">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Grid Margin="0,0,0,12" ColumnSpacing="12">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <Button
                x:Name="UserButton"
                Command="{x:Bind ViewModel.ShowUserSpaceCommand, Mode=OneWay}"
                Style="{StaticResource AvatarButtonStyle}">
                <PersonPicture
                    Width="36"
                    Height="36"
                    VerticalAlignment="Center"
                    DisplayName="{x:Bind ViewModel.Author, Mode=OneWay}"
                    ProfilePicture="{x:Bind ViewModel.Avatar, Mode=OneWay, Converter={StaticResource BitmapConverter}}" />
            </Button>
            <StackPanel
                Grid.Column="1"
                HorizontalAlignment="Left"
                VerticalAlignment="Center"
                Spacing="2">
                <TextBlock
                    MaxLines="1"
                    Text="{x:Bind ViewModel.Author, Mode=OneWay}"
                    TextTrimming="CharacterEllipsis" />
                <TextBlock
                    Foreground="{ThemeResource TextFillColorTertiaryBrush}"
                    MaxLines="1"
                    Style="{StaticResource CaptionTextBlockStyle}"
                    Text="{x:Bind ViewModel.Tip, Mode=OneWay}"
                    TextTrimming="CharacterEllipsis" />
            </StackPanel>
        </Grid>
        <local:EmoteTextBlock
            Grid.Row="1"
            Margin="0,0,0,12"
            MaxLines="8"
            Text="{x:Bind ViewModel.Description, Mode=OneWay}"
            Visibility="{x:Bind ViewModel.Description, Converter={StaticResource ObjectToVisibilityConverter}, Mode=OneWay}" />
        <moment:MomentPresenter
            Grid.Row="2"
            Margin="0,0,0,12"
            ViewModel="{x:Bind ViewModel, Mode=OneWay}"
            Visibility="{x:Bind ViewModel.NoData, Converter={StaticResource BoolToVisibilityReverseConverter}, Mode=OneWay}" />
        <local:MomentItemOperationPanel Grid.Row="3" ViewModel="{x:Bind ViewModel, Mode=OneWay}" />
    </Grid>
</local:MomentCardPresenter>
