<UserControl x:Class="NebulaAuth.View.Dialogs.SdaPasswordDialog"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
             xmlns:other="clr-namespace:NebulaAuth.ViewModel.Other"
             xmlns:nebulaAuth="clr-namespace:NebulaAuth"
             mc:Ignorable="d"
             TextElement.Foreground="{DynamicResource BaseContentBrush}"
             d:DataContext="{d:DesignInstance other:SdaPasswordDialogVM}"
             Background="{DynamicResource WindowBackground}">

    <Grid MinHeight="200" MinWidth="400" MaxWidth="500">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <nebulaAuth:DialogHeader IconKind="Lock"
                                 Title="{Tr SdaPasswordDialog.Title}"
                                 CloseParameter="{StaticResource False}" />
        <Grid Grid.Row="1" Margin="12">
            <Grid.RowDefinitions>
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
                <RowDefinition Height="Auto" />
            </Grid.RowDefinitions>
            <TextBlock Grid.Row="0" Text="{Tr SdaPasswordDialog.Message}" TextWrapping="Wrap"
                       Foreground="{DynamicResource BaseContentBrush}" Margin="10,10,10,8" />
            <TextBox Grid.Row="1" Text="{Binding Password, UpdateSourceTrigger=PropertyChanged}"
                     materialDesign:TextFieldAssist.HasClearButton="True"
                     Padding="10" FontSize="15" Margin="10,0,10,0"
                     Style="{StaticResource MaterialDesignOutlinedTextBox}"
                     materialDesign:HintAssist.Hint="{Tr SdaPasswordDialog.PasswordHint}"
                     materialDesign:HintAssist.IsFloating="False"
                     materialDesign:TextFieldAssist.LeadingIcon="Key"
                     materialDesign:TextFieldAssist.HasLeadingIcon="True" />
            <Grid Grid.Row="2" Margin="10,16,10,0">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition />
                </Grid.ColumnDefinitions>
                <Button IsEnabled="{Binding IsFormValid}" IsDefault="True" Margin="0,5,5,5"
                        Style="{StaticResource MaterialDesignOutlinedButton}"
                        Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
                        CommandParameter="{StaticResource True}" Content="{Tr Common.OK}" />
                <Button IsCancel="True" Grid.Column="1" Margin="5,5,0,5"
                        Style="{StaticResource MaterialDesignOutlinedButton}"
                        Command="{x:Static materialDesign:DialogHost.CloseDialogCommand}"
                        CommandParameter="{StaticResource False}" Content="{Tr Common.Cancel}" />
            </Grid>
        </Grid>
    </Grid>
</UserControl>