<?xml version="1.0" encoding="utf-8" ?>
<base:LayoutUserControlBase
    x:Class="RodelAgent.UI.Controls.VisibilityToggleButton"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:animations="using:CommunityToolkit.WinUI.Animations"
    xmlns:base="using:Richasy.WinUI.Share.Base"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:RodelAgent.UI.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    HorizontalAlignment="Center"
    VerticalAlignment="Center"
    mc:Ignorable="d">

    <Grid
        x:Name="Root"
        Width="32"
        Height="100"
        VerticalAlignment="Center"
        Background="{ThemeResource ControlAltFillColorTransparentBrush}">
        <Grid
            x:Name="BackgroundGrid"
            Width="32"
            Height="48"
            VerticalAlignment="Center"
            Background="{ThemeResource SolidBackgroundFillColorBaseBrush}"
            BorderBrush="{ThemeResource DividerStrokeColorDefaultBrush}"
            BorderThickness="1"
            CornerRadius="{x:Bind CornerRadius, Mode=OneWay}"
            Visibility="Collapsed" />
        <Button
            x:Name="Btn"
            Width="32"
            Height="48"
            Padding="0"
            HorizontalAlignment="Center"
            VerticalAlignment="Center"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            BorderThickness="0"
            Click="OnBtnClick"
            CornerRadius="{x:Bind CornerRadius, Mode=OneWay}"
            Visibility="Collapsed">
            <ic:SymbolIcon
                x:Name="Icon"
                FontSize="14"
                Symbol="ChevronRight" />
            <animations:Implicit.ShowAnimations>
                <animations:OpacityAnimation
                    From="0.0"
                    To="1.0"
                    Duration="0:0:0.6" />
            </animations:Implicit.ShowAnimations>
            <animations:Implicit.HideAnimations>
                <animations:OpacityAnimation
                    From="1.0"
                    To="0.0"
                    Duration="0:0:0.6" />
            </animations:Implicit.HideAnimations>
        </Button>
    </Grid>
</base:LayoutUserControlBase>
