<Window x:Class="ReAct_PME.GenerateEmail"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:ReAct_PME"
        mc:Ignorable="d"
        Title="Generation d'un Email" Height="700" Width="800" Background="#FFF0F0F0">
    <Grid Margin="5,5,5,5">
        <Grid.RowDefinitions>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*" MinHeight="80"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="*" MinHeight="200"/>
            <RowDefinition Height="30"/>
            <RowDefinition Height="30"/>
        </Grid.RowDefinitions>

        <TextBlock Text="L'objet du message" Margin="5,5,5,5" Grid.Row="0"/>
        <TextBox Text="{Binding SelectItem.Object, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="0"
                 Background="Wheat"/>

        <TextBlock Text="Destinaires du message (A)" Margin="5,5,5,5" Grid.Row="1"/>
        <TextBox Text="{Binding SelectItem.DestinataireA, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="1"
                 ToolTip="Le ou les destinataire(s) principal(aux) du mail.... Séparez les adresses mail par un ;"
                 Background="Wheat"/>

        <TextBlock Text="Destinaires du message (Cc)" Margin="5,5,5,5" Grid.Row="2"/>
        <TextBox Text="{Binding SelectItem.DestinataireCC, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="2"
                 ToolTip="Le ou les destinataire(s) en copie du mail.... Séparez les adresses mail par un ;"
                 Background="Wheat"/>

        <TextBlock Text="Type de message" Margin="5,5,5,5" Grid.Row="3"/>
        <!--<TextBox Text="{Binding SelectItem.Type, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="3"/>-->
        <ComboBox ItemsSource="{Binding ListeTypes}" SelectedItem="{Binding SelectItem.Type, Mode=TwoWay}" Margin="190,5,5,5" 
                                Grid.Row="3"/>

        <TextBlock Text="Ton" Margin="5,5,5,5" Grid.Row="4"/>
        <ComboBox ItemsSource="{Binding ListeTons}" Text="{Binding SelectItem.Ton, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="190,5,5,5" 
                  		        IsEditable="True"
                                IsReadOnly="False"
                                Grid.Row="4"/>

        <TextBlock Text="Posture" Margin="5,5,5,5" Grid.Row="5"/>
        <ComboBox ItemsSource="{Binding ListePostures}" Text="{Binding SelectItem.Posture, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="190,5,5,5"
                  		        IsEditable="True"
                                IsReadOnly="False"
                                Grid.Row="5"/>

        <TextBlock Text="Couleur" Margin="5,5,5,5" Grid.Row="6"/>
        <ComboBox ItemsSource="{Binding ListeCouleurs}" Text="{Binding SelectItem.Couleur, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="190,5,5,5" 
                  		        IsEditable="True"
                                IsReadOnly="False"
                                Grid.Row="6"/>

        <TextBlock Text="Niveau de détail" Margin="5,5,5,5" Grid.Row="7"/>
        <ComboBox ItemsSource="{Binding ListeNiveauxDetail}" Text="{Binding SelectItem.NiveauDetail, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="190,5,5,5" 
                  		        IsEditable="True"
                                IsReadOnly="False"
                                Grid.Row="7"/>

        <TextBlock Text="Vouvoiement nécessaire ?" Margin="5,5,5,5" Grid.Row="8"/>
        <CheckBox IsChecked="{Binding SelectItem.VOUS_TU, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="8"/>

        <TextBlock Text="Votre requête à l'assistant" Margin="5,5,5,5" Grid.Row="9"/>
        <TextBox Text="{Binding SelectItem.Query, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="9"
                 TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto"/>

        <Button Style="{DynamicResource ButtonStyle}" x:Name="BtnGenerer" Content="Générer" Click="OnGenerateClick" Width="120" Margin="190,0,0,0" Height="30" Grid.Row="10" HorizontalAlignment="Left" />

        <TextBlock Text="Message généré" Margin="5,5,5,5" Grid.Row="11"/>
        <TextBox Text="{Binding SelectItem.Body, Mode=TwoWay}" Margin="190,5,5,5" Grid.Row="11"
                 TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto"
                 Background="AntiqueWhite"/>
        
        <TextBlock x:Name="StatusText" Background="AliceBlue" Foreground="Green" Margin="5,5,5,5" Grid.Row="12"/>

        <Button Style="{DynamicResource ButtonStyle}" x:Name="BtnEnvoyer" Content="Envoyer" Click="OnSendClick" Width="120" Margin="0,0,140,0" Height="30" Grid.Row="13" HorizontalAlignment="Right" IsEnabled="False"/>
        <Button Style="{DynamicResource ButtonStyle}" Content="Fermer" Click="OnFermerClick" Width="120" Margin="0,0,0,0" Height="30" Grid.Row="13" HorizontalAlignment="Right"/>
    </Grid>
</Window>
