<UserControl
    Background="{DynamicResource ContainerBackgroundColor}"
    d:DesignHeight="450"
    d:DesignWidth="800"
    mc:Ignorable="d"
    x:Class="FileTime.GuiApp.App.Views.FrequencyNavigation"
    x:CompileBindings="True"
    x:DataType="viewModels:IFrequencyNavigationViewModel"
    xmlns="https://github.com/avaloniaui"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="clr-namespace:FileTime.App.FrequencyNavigation.ViewModels;assembly=FileTime.App.FrequencyNavigation.Abstractions"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Styles>
        <StyleInclude Source="avares://FileTime.GuiApp.App/Resources/Styles.axaml" />
    </UserControl.Styles>
    <Grid RowDefinitions="Auto,*">
        <TextBox
            KeyDown="Search_OnKeyDown"
            KeyUp="Search_OnKeyUp"
            Text="{Binding SearchText, Mode=TwoWay}"
            x:Name="SearchTextBox" />
        <ListBox
            Classes="CommandPalette"
            Grid.Row="1"
            ItemsSource="{Binding FilteredMatches}"
            SelectedItem="{Binding SelectedItem}">
            <ListBox.ItemTemplate>
                <DataTemplate x:DataType="x:String">
                    <Grid Margin="5">
                        <TextBlock Text="{Binding}" />
                    </Grid>
                </DataTemplate>
            </ListBox.ItemTemplate>
        </ListBox>
    </Grid>
</UserControl>