<UserControl
    x:Class="Bili.Workspace.Controls.App.TipPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:animations="using:CommunityToolkit.WinUI.UI.Animations"
    xmlns:controls="using:Bili.Workspace.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="using:Bili.Workspace.Controls.App"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:muxc="using:Microsoft.UI.Xaml.Controls"
    d:DesignHeight="300"
    d:DesignWidth="400"
    mc:Ignorable="d">

    <Grid
        x:Name="PopupContainer"
        HorizontalAlignment="Center"
        VerticalAlignment="Bottom">
        <animations:Implicit.ShowAnimations>
            <animations:TranslationAnimation
                From="0, -12, 0"
                To="0,-52,0"
                Duration="0:0:0.5" />
            <animations:OpacityAnimation
                From="0"
                To="1.0"
                Duration="0:0:0.5" />
        </animations:Implicit.ShowAnimations>
        <animations:Implicit.HideAnimations>
            <animations:TranslationAnimation
                From="0, -52, 0"
                To="0,-12,0"
                Duration="0:0:0.5" />
            <animations:OpacityAnimation
                From="1"
                To="0"
                Duration="0:0:0.5" />
        </animations:Implicit.HideAnimations>
        <Grid
            x:Name="PopupRootGrid"
            Padding="12,8,12,12"
            Background="{ThemeResource AppMaskAcrylicBrush}"
            ColumnSpacing="12"
            CornerRadius="{StaticResource OverlayCornerRadius}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition Width="*" />
            </Grid.ColumnDefinitions>
            <Grid Margin="0,4,0,0" VerticalAlignment="Center">
                <controls:FluentIcon
                    x:Name="InformationIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
                    Symbol="Info"
                    Visibility="Collapsed" />
                <controls:FluentIcon
                    x:Name="WarningIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}"
                    Symbol="Warning"
                    Visibility="Collapsed" />
                <controls:FluentIcon
                    x:Name="SuccessIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarSuccessSeverityIconBackground}"
                    Symbol="CheckmarkCircle"
                    Visibility="Collapsed" />
                <controls:FluentIcon
                    x:Name="ErrorIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}"
                    Symbol="DismissCircle"
                    Visibility="Collapsed" />
            </Grid>
            <TextBlock
                Grid.Column="1"
                MaxWidth="300"
                VerticalAlignment="Center"
                Text="{x:Bind Text, Mode=OneWay}"
                TextTrimming="CharacterEllipsis"
                TextWrapping="Wrap" />
        </Grid>
    </Grid>
</UserControl>
