<?xml version="1.0" encoding="utf-8" ?>
<local:AIControlBase
    x:Class="BiliCopilot.UI.Controls.AI.AIPanel"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="using:Richasy.WinUIKernel.Share.Base"
    xmlns:components="using:BiliCopilot.UI.Controls.Components"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:local="using:BiliCopilot.UI.Controls.AI"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Grid Visibility="{x:Bind ViewModel.IsNoService, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="56" />
                <RowDefinition Height="Auto" />
                <RowDefinition />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <local:AIHeader ViewModel="{x:Bind ViewModel, Mode=OneWay}" />
            <Border
                Grid.Row="1"
                Height="1"
                HorizontalAlignment="Stretch"
                Background="{ThemeResource DividerStrokeColorDefaultBrush}" />
            <base:EmptyHolder
                Title="{ext:Locale Name=NoAIModel}"
                Grid.Row="2"
                Description="{ext:Locale Name=NoAIModelDescription}"
                Emoji="&#x1F916;"
                Visibility="{x:Bind ViewModel.IsNoModel, Mode=OneWay}" />
            <local:AIBody
                Grid.Row="2"
                ViewModel="{x:Bind ViewModel, Mode=OneWay}"
                Visibility="{x:Bind ViewModel.IsNoModel, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
            <local:AIFooter Grid.Row="3" ViewModel="{x:Bind ViewModel, Mode=OneWay}" />
        </Grid>
        <base:EmptyHolder
            Title="{ext:Locale Name=NoAIService}"
            Description="{ext:Locale Name=NoAIServiceDescription}"
            Emoji="&#x1F916;"
            Visibility="{x:Bind ViewModel.IsNoService, Mode=OneWay}" />
    </Grid>
</local:AIControlBase>
