<UserControl x:Class="FasdDesktopUi.Basics.UserControls.DetailedRecommendation"
             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:local="clr-namespace:FasdDesktopUi.Pages.DetailsPage.UserControls"
             xmlns:ico="clr-namespace:FasdDesktopUi.Basics.UserControls.AdaptableIcon;assembly=F4SD-AdaptableIcon"
             xmlns:converter="clr-namespace:FasdDesktopUi.Basics.Converter"
             x:Name="RecommendationUc"
             mc:Ignorable="d" 
             d:DesignHeight="450" d:DesignWidth="800">

    <UserControl.Resources>
        <BooleanToVisibilityConverter x:Key="BoolToVisibility"/>
        <converter:NullValueToVisibilityConverter x:Key="NullToVisibility"/>
    </UserControl.Resources>

    <Border Visibility="{Binding ElementName=RecommendationUc, Path=RecommendationData, Converter={StaticResource NullToVisibility}}"        
            Padding="10"
            CornerRadius="10"
            Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.ValueColumn}">

        <StackPanel>
            <DockPanel>

                <ico:AdaptableIcon x:Name="CloseButton"
                                   DockPanel.Dock="Right"
                                   Style="{DynamicResource SettingsPage.Close.Icon}"
                                   MouseUp="CloseButton_MouseUp"
                                   TouchDown="CloseButton_TouchDown"
                                   Visibility="{Binding ElementName=RecommendationUc, Path=IsCloseButtonVisible, Converter={StaticResource BoolToVisibility}}"
                                   SelectedInternIcon="window_close" />

                <ico:AdaptableIcon x:Name="RecommendationIcon"
                                   x:FieldModifier="private"
                                   DockPanel.Dock="Left"
                                   VerticalAlignment="Center"
                                   PrimaryIconColor="{DynamicResource Color.Blue}"
                                   BorderPadding="0"
                                   IconHeight="15"
                                   IconWidth="15"
                                   SelectedInternIcon="status_info" />

                <TextBlock Text="{Binding RecommendationData.Category, ElementName=RecommendationUc}"
                       DockPanel.Dock="Left"
                       Style="{DynamicResource DetailsPage.DataHistory.TitleColumn.OverviewTitle}"
                       VerticalAlignment="Center"
                       HorizontalAlignment="Left"
                       Margin="10" />

            </DockPanel>

            <Border Padding="10"
                        Background="{DynamicResource BackgroundColor.DetailsPage.DataHistory.TitleColumn}"
                        CornerRadius="10">
                <TextBlock Text="{Binding ElementName=RecommendationUc, Path=RecommendationData.Recommendation}"
                               Foreground="{DynamicResource FontColor.DetailsPage.DataHistory.Value}"
                               FontFamily="Calibri"
                               FontSize="14"
                               FontWeight="Regular"
                               TextWrapping="Wrap"/>
            </Border>
        </StackPanel>

    </Border>

</UserControl>
