<UserControl
    x:Class="Bili.App.Controls.TipPopup"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:animations="using:Microsoft.Toolkit.Uwp.UI.Animations"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:icons="using:Richasy.FluentIcon.Uwp"
    xmlns:local="using:Bili.App.Controls"
    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">
                <icons:RegularFluentIcon
                    x:Name="InformationIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarInformationalSeverityIconBackground}"
                    Symbol="Info16"
                    Visibility="Collapsed" />
                <icons:RegularFluentIcon
                    x:Name="WarningIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarWarningSeverityIconBackground}"
                    Symbol="Warning16"
                    Visibility="Collapsed" />
                <icons:RegularFluentIcon
                    x:Name="SuccessIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarSuccessSeverityIconBackground}"
                    Symbol="CheckmarkCircle20"
                    Visibility="Collapsed" />
                <icons:RegularFluentIcon
                    x:Name="ErrorIcon"
                    FontSize="14"
                    Foreground="{ThemeResource InfoBarErrorSeverityIconBackground}"
                    Symbol="DismissCircle16"
                    Visibility="Collapsed" />
            </Grid>
            <TextBlock
                Grid.Column="1"
                MaxWidth="300"
                VerticalAlignment="Center"
                Text="{x:Bind Text, Mode=OneWay}"
                TextTrimming="CharacterEllipsis"
                TextWrapping="Wrap" />
        </Grid>
    </Grid>
</UserControl>
