<Window x:Class="ReAct_PME.DetailEmail"
        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="Détail pour un Email" Height="800" MinWidth="600" Width="900" Background="#FFF0F0F0">
    <Grid>
        <Grid Margin="10,10,10,10">
            <Grid.RowDefinitions>
                <RowDefinition Height="35"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="100"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="100"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="100"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="*" MinHeight="150"/>
                <RowDefinition Height="30"/>
                <RowDefinition Height="30"/>
            </Grid.RowDefinitions>

            <TextBlock Text="De : "    Width="30" FontWeight="Bold" Grid.Row="0" Margin="0,0,0,0"    HorizontalAlignment="Left" />
            <TextBlock Text="Le : "    Width="30" FontWeight="Bold" Grid.Row="0" Margin="230,0,0,0"  HorizontalAlignment="Left" />
            <TextBlock Text="Sujet : " Width="50" FontWeight="Bold" Grid.Row="0" Margin="370,0,0,0"  HorizontalAlignment="Left" />

            <TextBlock Text="{Binding SelectedItem.From, Mode=OneWay}"    Width="200" Grid.Row="0" Margin="30,0,0,0"   HorizontalAlignment="Left" />
            <TextBlock Text="{Binding SelectedItem.DateSTR, Mode=OneWay}" Width="150" Grid.Row="0" Margin="260,0,0,0" HorizontalAlignment="Left"/>
            <TextBlock Text="{Binding SelectedItem.Subject, Mode=OneWay}" Grid.Row="0" Margin="410,0,0,0" HorizontalAlignment="Left"/>

            <TextBlock Text="Email original :" FontWeight="Bold" Grid.Row="1" HorizontalAlignment="Left"/>
            <TextBlock Text="{Binding SelectedItem.ModeleIA, Mode=OneWay}" Grid.Row="1" Margin="150,0,0,0" HorizontalAlignment="Left"/>
            <Label x:Name="LabelPJ" Content="{Binding NbrPJ}"  Width="100" Margin="0,0,350,0" Grid.Row="1" HorizontalAlignment="Right"/>
            <Label x:Name="LabelDestinatairePrincipal" Content="{Binding SelectedItem.IsDestinatairePrincipal_STR}"  Width="100" Margin="325,0,0,0" Grid.Row="1" HorizontalAlignment="Left" ToolTip="{Binding SelectedItem.IsDestinatairePrincipal_STR_TXT}"/>
            <Label x:Name="LabelPriorite" Content="{Binding SelectedItem.Priorite}" Margin="0,0,150,0" Grid.Row="1" HorizontalAlignment="Right"/>
            <Button Style="{DynamicResource ButtonStyle}" Content="Résumé PJ" Width="110" Margin="0,0,0,0" Height="30" Grid.Row="1" HorizontalAlignment="Right" Click="Button_Click" IsEnabled="{Binding SelectedItem.IsPJ}"/>

            <TextBox x:Name="EmailContentBox" Text="{Binding SelectedItem.TextBody_PJ, Mode=OneWay}" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Grid.Row="2" VerticalScrollBarVisibility="Auto"/>

            <TextBlock Text="Résumé :" FontWeight="Bold" Margin="0,5,0,0" Grid.Row="3"/>
            <TextBox x:Name="ResumeBox"  Text="{Binding SelectedItem.Resume, Mode=TwoWay}" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Grid.Row="4" VerticalScrollBarVisibility="Auto"/>

            <TextBlock Text="Catégorie :" FontWeight="Bold" Margin="0,5,0,0" Grid.Row="5"/>
            <TextBox x:Name="CategorieBox"  Text="{Binding SelectedItem.Categorie, Mode=TwoWay}" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Grid.Row="6" VerticalScrollBarVisibility="Auto"/>

            <TextBlock Text="Stratégie :" FontWeight="Bold" Margin="0,5,0,0" Grid.Row="7"/>
            <TextBox x:Name="StrategieBox"  Text="{Binding SelectedItem.Strategie, Mode=TwoWay}" TextWrapping="Wrap" AcceptsReturn="True" IsReadOnly="True" Grid.Row="8" VerticalScrollBarVisibility="Auto"/>

            <TextBlock Text="Réponse générée :" FontWeight="Bold" Margin="0,5,0,0" Grid.Row="9"/>
            <TextBox x:Name="ReponseBox"  Text="{Binding SelectedItem.Reponse, Mode=TwoWay}" TextWrapping="Wrap" AcceptsReturn="True" VerticalScrollBarVisibility="Auto" Grid.Row="10" />

            <TextBlock x:Name="StatusText" Background="AliceBlue" Foreground="Green" Margin="5,5,5,5" Grid.Row="11"/>

            <Button Style="{DynamicResource ButtonStyle}" Content="Envoyer la réponse" Click="OnEnvoyerClick" Width="146" Margin="0,0,450,0" Height="30" Grid.Row="12" HorizontalAlignment="Right"/>
            <Button Style="{DynamicResource ButtonStyle}" Content="Re-Générer la réponse" Click="OnReGenerateClick" Width="146" Margin="0,0,300,0" Height="30" Grid.Row="12" HorizontalAlignment="Right"/>
            <Button Style="{DynamicResource ButtonStyle}" Content="Marquer comme lu" Click="OnMarquerClick" Width="146" Margin="0,0,150,0" Height="30" Grid.Row="12" HorizontalAlignment="Right"/>
            <Button Style="{DynamicResource ButtonStyle}" Content="Fermer" Click="OnFermerClick" Width="146" Margin="0,0,0,0" Height="30" Grid.Row="12" HorizontalAlignment="Right"/>
            

        </Grid>

    </Grid>
</Window>
