<?xml version="1.0" encoding="utf-8" ?>
<controls:ChatServiceConfigControlBase
    x:Class="RodelAgent.UI.Controls.Startup.ChatConfigurationSection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:controls="using:RodelAgent.UI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:RodelAgent.UI.Extensions"
    xmlns:items="using:RodelAgent.UI.ViewModels.Items"
    xmlns:local="using:RodelAgent.UI.Controls.Startup"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <StackPanel>
        <ContentPresenter x:Name="FormPresenter" Margin="0,0,0,12" />
        <Grid Margin="0,0,0,12" Visibility="{x:Bind ViewModel.IsServerModelVisible, Mode=OneWay}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>
            <TextBlock
                VerticalAlignment="Center"
                Foreground="{ThemeResource TextFillColorSecondaryBrush}"
                Style="{StaticResource CaptionTextBlockStyle}"
                Text="{ext:Locale Name=PredefinedModels}" />
            <HyperlinkButton
                Grid.Column="1"
                VerticalAlignment="Center"
                Click="OnPredefinedModelsClick"
                Content="{ext:Locale Name=SeeAllModels}">
                <FlyoutBase.AttachedFlyout>
                    <Flyout Placement="Bottom">
                        <local:PredefinedChatModelSection MinWidth="330" ViewModel="{x:Bind ViewModel}" />
                    </Flyout>
                </FlyoutBase.AttachedFlyout>
            </HyperlinkButton>
        </Grid>

        <local:CustomChatModelSection ViewModel="{x:Bind ViewModel}" />
    </StackPanel>
</controls:ChatServiceConfigControlBase>
