<StackPanel
    x:Class="Pixeval.Controls.IPListInput"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:CommunityToolkit.WinUI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:fluent="using:FluentIcons.WinUI"
    xmlns:local="using:Pixeval.Controls"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    MinWidth="200"
    Orientation="Vertical"
    mc:Ignorable="d">
    <TextBlock Margin="10" Text="{x:Bind Header}" />
    <AutoSuggestBox
        QueryIcon="{fluent:SymbolIcon Symbol=Add,
                                      FontSize={StaticResource SmallIconFontSize}}"
        QuerySubmitted="AddItem"
        TextChanged="TextChanged" />
    <InfoBar x:Name="ErrorInfoBar" IsClosable="True" />
    <ListView
        AllowDrop="True"
        CanDragItems="True"
        CanReorderItems="True"
        ItemsSource="{x:Bind ItemsSource, Mode=OneWay}">
        <ListView.ItemTemplate>
            <DataTemplate x:DataType="x:String">
                <controls:DockPanel Tag="{x:Bind}" Tapped="RemoveTapped">
                    <SymbolIcon controls:DockPanel.Dock="Right" Symbol="Cancel" />
                    <TextBlock
                        VerticalAlignment="Center"
                        Text="{x:Bind}"
                        TextAlignment="Left" />
                </controls:DockPanel>
            </DataTemplate>
        </ListView.ItemTemplate>
    </ListView>
</StackPanel>
