<?xml version="1.0" encoding="utf-8" ?>
<UserControl
    x:Class="BiliCopilot.UI.Controls.Search.SearchSectionItemControl"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="using:BiliCopilot.UI.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:BiliCopilot.UI.Controls.Search"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <UserControl.Resources>
        <converters:SearchSectionIconConverter x:Key="IconConverter" />
        <converters:SearchSectionTextConverter x:Key="TextConverter" />
    </UserControl.Resources>

    <Grid Padding="12,0" ColumnSpacing="12">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <ic:SymbolIcon
            VerticalAlignment="Center"
            FontSize="14"
            Symbol="{x:Bind ViewModel.SectionType, Mode=OneWay, Converter={StaticResource IconConverter}}" />
        <TextBlock
            Grid.Column="1"
            VerticalAlignment="Center"
            Text="{x:Bind ViewModel.SectionType, Mode=OneWay, Converter={StaticResource TextConverter}}" />
    </Grid>
</UserControl>
