<?xml version="1.0" encoding="utf-8" ?>
<local:VideoSectionDetailControlBase
    x:Class="BiliCopilot.UI.Controls.Search.VideoSearchExtraHeader"
    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:ext="using:BiliCopilot.UI.Extensions"
    xmlns:local="using:BiliCopilot.UI.Controls.Search"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:models="using:Richasy.BiliKernel.Models"
    mc:Ignorable="d">

    <StackPanel Orientation="Horizontal">
        <ComboBox
            x:Name="SortComboBox"
            MinWidth="120"
            VerticalAlignment="Center"
            IsEnabled="{x:Bind ViewModel.IsLoading, Mode=OneWay, Converter={StaticResource ObjectToBoolReverseConverter}}"
            ItemsSource="{x:Bind ViewModel.Sorts, Mode=OneWay}"
            SelectedItem="{x:Bind ViewModel.Sort, Mode=OneWay}"
            SelectionChanged="OnSortComboBoxChanged">
            <ComboBox.ItemTemplate>
                <DataTemplate x:DataType="models:ComprehensiveSearchSortType">
                    <TextBlock Text="{x:Bind Converter={StaticResource SortTypeTextConverter}}" />
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
    </StackPanel>
</local:VideoSectionDetailControlBase>
