<!-- PRE-GENERATED (design session). One provider's API key row: input <-> "이미 입력됨" states + 발급 링크. -->
<UserControl x:Class="DansoriEQ.App.Controls.ApiKeyRow"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Border Background="#2D2D33" CornerRadius="9" Padding="12,10" Margin="0,0,0,8">
        <Grid>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="180"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Column="0" VerticalAlignment="Center">
                <TextBlock x:Name="LblName" Foreground="#F2F3F5" FontWeight="SemiBold" FontSize="13"/>
                <Button x:Name="BtnHelpLink" Content="🔗 키 발급 방법" Click="HelpLink_Click"
                        Background="Transparent" BorderThickness="0" Foreground="#4CC2FF" FontSize="11"
                        HorizontalAlignment="Left" Padding="0" Cursor="Hand" Visibility="Collapsed"/>
            </StackPanel>

            <!-- INPUT state -->
            <Grid x:Name="InputPanel" Grid.Column="1">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <PasswordBox x:Name="Pwd" Grid.Column="0" Height="34" VerticalContentAlignment="Center" Padding="10,0"
                             Background="#26262B" Foreground="#F2F3F5" BorderBrush="#3A3A42"/>
                <Button Grid.Column="1" Content="저장" Click="Save_Click" Height="34" Padding="16,0" Margin="8,0,0,0"
                        Background="#4CC2FF" Foreground="#04222F" FontWeight="Bold" BorderThickness="0"/>
            </Grid>

            <!-- SAVED state (API hidden) -->
            <Grid x:Name="SavedPanel" Grid.Column="1" Visibility="Collapsed">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="*"/>
                    <ColumnDefinition Width="Auto"/>
                </Grid.ColumnDefinitions>
                <TextBlock Grid.Column="0" VerticalAlignment="Center" Foreground="#4FD08A"
                           Text="🔒 이미 입력되어 있음 (••••••••)"/>
                <Button Grid.Column="1" Content="삭제" Click="Delete_Click" Height="34" Padding="16,0" Margin="8,0,0,0"
                        Background="#26262B" Foreground="#A8ABB4" BorderBrush="#3A3A42"/>
            </Grid>
        </Grid>
    </Border>
</UserControl>
