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

    <Button
        VerticalAlignment="Center"
        HorizontalContentAlignment="Stretch"
        VerticalContentAlignment="Stretch"
        Click="OnItemClick"
        Style="{StaticResource IconButtonStyle}">
        <Grid>
            <Rectangle
                HorizontalAlignment="Stretch"
                VerticalAlignment="Stretch"
                Fill="{ThemeResource AccentFillColorDefaultBrush}"
                RadiusX="4"
                RadiusY="4"
                Visibility="{x:Bind IsSelected, Mode=OneWay}" />
            <ic:SymbolIcon
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                FontSize="14"
                Symbol="{x:Bind Symbol, Mode=OneWay}"
                Visibility="{x:Bind IsSelected, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
            <ic:SymbolIcon
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                FontSize="14"
                Foreground="{ThemeResource TextOnAccentAAFillColorPrimaryBrush}"
                IconVariant="Filled"
                Symbol="{x:Bind Symbol, Mode=OneWay}"
                Visibility="{x:Bind IsSelected, Mode=OneWay}" />
        </Grid>
    </Button>
</base:LayoutUserControlBase>
