<UserControl x:Class="PSCHelpdesk.Toasts.Display.ToastNotification"
             xmlns="https://github.com/avaloniaui"
             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:iconPack="clr-namespace:PSCHelpdesk.Shared;assembly=Shared"
             xmlns:vm="using:PSCHelpdesk.Toasts.Display"
             x:DataType="vm:ToastNotificationViewModel"
             mc:Ignorable="d" d:DesignWidth="250" d:DesignHeight="100">
  
  <Grid ColumnDefinitions="*,Auto" Background="{DynamicResource NotificationBackgroundColor}">
    <Border Grid.ColumnSpan="2" Height="65" Background="{DynamicResource NotificationBackgroundBrush}"
            BorderBrush="{DynamicResource NotificationBorder1Brush}" BorderThickness="4,4,4,0" />
    <Border Grid.ColumnSpan="2" Height="65" Background="Transparent"
            BorderBrush="{DynamicResource NotificationBorder2Brush}" BorderThickness="0,0,0,4" />

    <TextBlock Grid.Column="0"
               FontSize="11"
               FontWeight="Regular"
               Text="{Binding Message}"
               TextWrapping="Wrap"
               TextTrimming="CharacterEllipsis"
               MaxHeight="50"
               VerticalAlignment="Center"
               Margin="5"/>

    <Button Grid.Column="1"
            Margin="1"
            VerticalAlignment="Top"
            Width="20"
            Height="20"
            BorderThickness="0"
            Background="{DynamicResource NotificationBackgroundBrush}"
            Classes="styleless"
            Command="{Binding Path=CloseAction}"
            CommandParameter="{Binding Path=.}">
            <iconPack:IconControl Kind="PackIconMaterialKind.Close" Width="8" Height="8" />
    </Button>
  </Grid>
</UserControl>
