<Window
    x:Class="Client.View.MainWindow"
    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:local="clr-namespace:Client.View"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:Client.ViewModel"
    Name="MainWin"
    Width="1920"
    Height="1080"
    MinWidth="1600"
    MinHeight="900"
    Icon="/Client;component/Img/icon.png"
    WindowStartupLocation="CenterScreen"
    WindowState="Maximized"
    mc:Ignorable="d">

    <Grid Name="MainGrid">
        <Grid.RowDefinitions>
            <RowDefinition Height="60" />
            <RowDefinition Height="*" />
            <RowDefinition MaxHeight="35" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition
                Width="*"
                MinWidth="300"
                MaxWidth="270" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <StackPanel
            Name="MainMenuPanel"
            Grid.Row="1"
            Grid.Column="0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch">
            <StackPanel.Background>
                <LinearGradientBrush MappingMode="RelativeToBoundingBox" StartPoint="0.5,0" EndPoint="0.5,1">
                    <GradientStop Color="#FF065393" />
                    <GradientStop Offset="1" Color="#FF1D507A" />
                </LinearGradientBrush>
            </StackPanel.Background>

            <Rectangle
                Grid.Row="1"
                Grid.Column="0"
                Height="10" />

            <Label
                Margin="10,0,0,0"
                Content="SPRÁVA OSOBNÍCH DAT"
                FontSize="22"
                FontStyle="Italic"
                FontWeight="Bold"
                Foreground="White" />

            <Button
                Click="Button_Click"
                Command="{Binding ShowInfoPanelCommand}"
                Content="INFORMAČNÍ PANEL"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowEditAttendanceViewCommand}"
                Content="DOCHÁZKA"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowEditTimeSheetsViewCommand}"
                Content="VÝKAZY PRÁCE"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowEditRequestsViewCommand}"
                Content="ŽÁDOSTI"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowPersonalEventsCommand}"
                Content="PERSONÁLNÍ UDÁLOSTI"
                Style="{StaticResource MainMenuButton}" />

            <Label
                Margin="10,0,0,0"
                Content="SPRÁVA ORGANIZACE"
                FontSize="22"
                FontStyle="Italic"
                FontWeight="Bold"
                Foreground="White" />

            <Button
                Click="Button_Click"
                Command="{Binding ShowEmployeesViewCommand}"
                Content="EVIDENCE ZAMĚSTNANCŮ"
                Style="{StaticResource MainMenuButton}" />

            <Button
                Click="Button_Click"
                Command="{Binding Path=ShowEmployeesAttendanceViewCommand}"
                Content="EVIDENCE DOCHÁZKY"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding Path=ShowEmployeesTimeSheetsViewCommand}"
                Content="EVIDENCE PRACOVNÍCH VÝKAZŮ"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowDepartmentsViewCommand}"
                Content="EVIDENCE ODDĚLENÍ"
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowProjectsViewCommand}"
                Content="EVIDENCE PROJEKTŮ "
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowEmployeePositionsViewCommand}"
                Content="EVIDENCE PRACOVNÍCH POZIC "
                Style="{StaticResource MainMenuButton}" />
            <Button
                Click="Button_Click"
                Command="{Binding ShowUserRolesCommand}"
                Content="SPRÁVA UŽIVATELSKÝCH ÚČTŮ"
                Style="{StaticResource MainMenuButton}" />


        </StackPanel>

        <Grid
            Grid.Row="0"
            Grid.Column="0"
            Grid.ColumnSpan="3">
            <Rectangle Fill="White">
                <Rectangle.BitmapEffect>
                    <DropShadowBitmapEffect Color="DarkBlue" />
                </Rectangle.BitmapEffect>
            </Rectangle>
        </Grid>
        <Label
            Grid.Row="0"
            Grid.Column="0"
            Margin="24,0,0,0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            VerticalContentAlignment="Center"
            Content="DV"
            FontFamily="Ethnocentric"
            FontSize="36"
            FontStyle="Italic"
            FontWeight="Bold">
            <Label.Foreground>
                <RadialGradientBrush>
                    <GradientStop Offset="1" Color="#FF32465F" />
                    <GradientStop Color="#FF0375FF" />
                </RadialGradientBrush>
            </Label.Foreground>
        </Label>
        <Label
            Grid.Row="0"
            Grid.Column="0"
            Margin="110,5,0,0"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            VerticalContentAlignment="Center"
            Content="SOFT"
            FontFamily="Ethnocentric"
            FontSize="26">
            <Label.Foreground>
                <RadialGradientBrush>
                    <GradientStop Offset="1" Color="#FF32465F" />
                    <GradientStop Color="#FF1F579B" />
                </RadialGradientBrush>
            </Label.Foreground>
        </Label>
        <Label
            Grid.Row="0"
            Grid.Column="1"
            Width="130"
            Height="30"
            Margin="0,0,80,20"
            HorizontalAlignment="Right"
            HorizontalContentAlignment="Right"
            VerticalContentAlignment="Center"
            Content="{Binding LoggedUser, Mode=OneWay}"
            FontFamily="Segoe UI"
            FontSize="16"
            Foreground="#FF065393" />

        <Button
            Grid.Row="0"
            Grid.Column="1"
            Width="25"
            Height="25"
            Margin="0,0,120,-30"
            HorizontalAlignment="Right"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Background="#FF065393"
            Command="{Binding LogoutCommand}"
            CommandParameter="{Binding ElementName=MainWin}">
            <Image
                Width="20"
                Height="20"
                RenderOptions.BitmapScalingMode="Fant"
                Source="/Client;component/Img/logout.png" />
        </Button>

        <Button
            Grid.Row="0"
            Grid.Column="1"
            Width="25"
            Height="25"
            Margin="0,0,90,-30"
            HorizontalAlignment="Right"
            HorizontalContentAlignment="Center"
            VerticalContentAlignment="Center"
            Background="#FF065393"
            Command="{Binding OpenUserSettingsCommand}">
            <Image
                Width="20"
                Height="20"
                RenderOptions.BitmapScalingMode="Fant"
                Source="/Client;component/Img/setting.png" />
        </Button>
        <Image
            Grid.Row="0"
            Grid.Column="1"
            Width="50"
            Height="50"
            Margin="0,0,20,0"
            HorizontalAlignment="Right"
            RenderOptions.BitmapScalingMode="Fant"
            Source="/Client;component/Img/login-user-icon.png" />
        <Frame
            Name="Frame"
            Grid.Row="1"
            Grid.RowSpan="2"
            Grid.Column="2"
            Margin="10,10,10,20"
            HorizontalAlignment="Stretch"
            VerticalAlignment="Stretch"
            HorizontalContentAlignment="Stretch"
            VerticalContentAlignment="Stretch"
            Content="{Binding Path=FrameContent, Mode=OneWay, UpdateSourceTrigger=PropertyChanged}"
            NavigationUIVisibility="Hidden" />
        <StackPanel
            Grid.Row="2"
            Grid.Column="0"
            Background="#FF113E63"
            Orientation="Horizontal">
            <Ellipse
                Grid.Row="1"
                Grid.Column="3"
                Width="10"
                Height="10"
                Margin="30,0,0,0"
                HorizontalAlignment="Center"
                VerticalAlignment="Center"
                Fill="{Binding ServerConnectionStatusColor, Mode=OneWay}" />
            <Label
                Grid.Row="3"
                Grid.ColumnSpan="1"
                HorizontalAlignment="Stretch"
                HorizontalContentAlignment="Center"
                VerticalContentAlignment="Center"
                Background="Transparent"
                Content="{Binding ServerConnectionStatus, Mode=OneWay}"
                FontSize="16"
                Foreground="White" />
        </StackPanel>
    </Grid>
</Window>
