<?xml version="1.0" encoding="utf-8" ?>
<controls:TranslateServiceConfigControlBase
    x:Class="RodelAgent.UI.Controls.Settings.TranslateAppClientConfigSettingSection"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="using:Richasy.WinUI.Share.Base"
    xmlns:controls="using:RodelAgent.UI.Controls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:RodelAgent.UI.Extensions"
    xmlns:ic="using:FluentIcons.WinUI"
    xmlns:local="using:RodelAgent.UI.Controls.Settings"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <base:SettingsExpander AutomationProperties.Name="{x:Bind ViewModel.Name, Mode=OneWay}">
        <base:SettingsExpander.Header>
            <controls:ProviderLogo
                x:Name="Logo"
                Height="24"
                Provider="{x:Bind ViewModel.ProviderType, Mode=OneWay}" />
        </base:SettingsExpander.Header>
        <base:SettingsExpander.Items>
            <base:SettingsCard x:Name="KeyCard" Header="{ext:Locale Name=AccessKey}">
                <PasswordBox
                    x:Name="KeyBox"
                    Width="200"
                    AutomationProperties.Name="{ext:Locale Name=AccessKey}"
                    Loaded="OnKeyBoxLoaded"
                    PasswordChanged="OnKeyBoxPasswordChanged" />
            </base:SettingsCard>
            <base:SettingsCard Description="{ext:Locale Name=AppIdDescription}" Header="{ext:Locale Name=AppId}">
                <TextBox
                    x:Name="AppIdBox"
                    Width="200"
                    AutomationProperties.Name="{ext:Locale Name=AppIdDescription}"
                    PlaceholderText="xxxx"
                    TextChanged="OnAppIdBoxTextChanged" />
            </base:SettingsCard>
        </base:SettingsExpander.Items>
        <ic:SymbolIcon
            FontSize="14"
            Foreground="{ThemeResource SystemFillColorSuccessBrush}"
            IconVariant="Filled"
            Symbol="CheckmarkCircle"
            Visibility="{x:Bind ViewModel.IsCompleted, Mode=OneWay}" />
    </base:SettingsExpander>
</controls:TranslateServiceConfigControlBase>
