<Window
    x:Class="Client.View.AttendanceStatisticsView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:Wpf="clr-namespace:LiveCharts.Wpf;assembly=LiveCharts.Wpf"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ei="http://schemas.microsoft.com/expression/2010/interactions"
    xmlns:i="http://schemas.microsoft.com/expression/2010/interactivity"
    xmlns:local="clr-namespace:Client.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:Client.ViewModel"
    xmlns:xctk="http://schemas.xceed.com/wpf/xaml/toolkit"
    x:Name="ProjectDetailWindow"
    Width="600"
    Height="530"
    Icon="/Client;component/Img/icon.png"
    ResizeMode="NoResize"
    VisualTextRenderingMode="ClearType"
    mc:Ignorable="d">

    <Grid Background="#FFD6DFE1">

        <Grid.RowDefinitions>
            <RowDefinition Height="50" />
            <RowDefinition Height="70" />
            <RowDefinition Height="70" />
            <RowDefinition Height="30" />
            <RowDefinition Height="*" />
            <RowDefinition Height="20" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Rectangle
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="3"
            Height="50"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Top">
            <Rectangle.Fill>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF065393" />
                    <GradientStop Offset="1" Color="#FF1D507A" />
                </LinearGradientBrush>
            </Rectangle.Fill>
        </Rectangle>
        <TextBlock
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="3"
            Margin="50,10,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            FontSize="24"
            FontWeight="Bold"
            Foreground="White"
            Text="STATISTIKA DOCHÁZKY" />

        <Label
            Grid.Row="1"
            Margin="50,0,0,0"
            Content="Zaměstnanec"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            IsReadOnly="true"
            Grid.Row="1"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=MonthlyAttendanceData.EmployeeName}" />

        <Label
            Grid.Row="2"
            Margin="50,0,0,0"
            Content="Celkový počet hodin"
            Style="{StaticResource DetailLabel}" />
        <TextBox
            Grid.Row="2"
            Width="235"
            Height="30"
            Margin="50,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            IsReadOnly="True"
            Text="{Binding Path=TotalHours}" />

        <Label
            Grid.Row="1"
            Grid.Column="1"
            Margin="14,0,0,0"
            Content="Měsíc"
            Style="{StaticResource DetailLabel}" />

        <TextBox
            IsReadOnly="True"
            Grid.Row="1"
            Grid.Column="1"
            Width="235"
            Height="30"
            Margin="15,30,0,0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            HorizontalContentAlignment="Left"
            VerticalContentAlignment="Center"
            Background="White"
            BorderBrush="#77869b"
            BorderThickness="1"
            FontSize="16"
            Foreground="#FF383636"
            Text="{Binding Path=MonthlyAttendanceData.MonthName}" />

        <Label
            Grid.Row="3"
            Grid.ColumnSpan="2"
            HorizontalAlignment="Center"
            Content="Rozložení hodin"
            Style="{StaticResource DetailLabel}" />
        <Wpf:PieChart
            Grid.Row="4"
            Grid.RowSpan="4"
            Grid.Column="0"
            Grid.ColumnSpan="2"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            Hoverable="False"
            LegendLocation="Bottom"
            Series="{Binding Path=HourDistributionSeries}" />

    </Grid>
</Window>
