<Application x:Class="ConeCalorimeter.App"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:viewModels="clr-namespace:ConeCalorimeter.ViewModels"
             xmlns:views="clr-namespace:ConeCalorimeter.Views"
             StartupUri="MainWindow.xaml">
    <Application.Resources>
        <DataTemplate DataType="{x:Type viewModels:TestPageViewModel}">
            <views:TestPageView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:PlaceholderPageViewModel}">
            <views:PlaceholderPageView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:SmokeDensitySettingsViewModel}">
            <views:SmokeDensitySettingsView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:ConeRadiationSettingsViewModel}">
            <views:ConeRadiationSettingsView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:CValueCalibrationViewModel}">
            <views:CValueCalibrationView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:RealtimeDataViewModel}">
            <views:RealtimeDataView />
        </DataTemplate>

        <DataTemplate DataType="{x:Type viewModels:ReportPageViewModel}">
            <views:ReportPageView />
        </DataTemplate>

        <Style x:Key="InstrumentButtonStyle" TargetType="Button">
            <Setter Property="MinHeight" Value="42" />
            <Setter Property="MinWidth" Value="100" />
            <Setter Property="Padding" Value="10,0" />
            <Setter Property="FontSize" Value="18" />
            <Setter Property="FontWeight" Value="SemiBold" />
            <Setter Property="Foreground" Value="#172320" />
            <Setter Property="Background" Value="#EEF1EF" />
            <Setter Property="BorderBrush" Value="#A9B1AD" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="HorizontalContentAlignment" Value="Center" />
            <Setter Property="VerticalContentAlignment" Value="Center" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border x:Name="ButtonBorder"
                                Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="6"
                                SnapsToDevicePixels="True">
                            <ContentPresenter Margin="{TemplateBinding Padding}"
                                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                              RecognizesAccessKey="True" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter TargetName="ButtonBorder" Property="Background" Value="#FFFFFF" />
                                <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#7F8B86" />
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter TargetName="ButtonBorder" Property="Background" Value="#D9DFDC" />
                                <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#6E7974" />
                            </Trigger>
                            <Trigger Property="IsEnabled" Value="False">
                                <Setter TargetName="ButtonBorder" Property="Background" Value="#E7EAE8" />
                                <Setter TargetName="ButtonBorder" Property="BorderBrush" Value="#C6CCC8" />
                                <Setter Property="Foreground" Value="#8B9691" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="InstrumentPrimaryButtonStyle"
               TargetType="Button"
               BasedOn="{StaticResource InstrumentButtonStyle}">
        </Style>

        <Style x:Key="NavigationButtonStyle" TargetType="Button">
            <Setter Property="Margin" Value="10,12" />
            <Setter Property="MinHeight" Value="44" />
            <Setter Property="Padding" Value="14,0" />
            <Setter Property="Background" Value="#EEF1EF" />
            <Setter Property="BorderBrush" Value="#9FA6A2" />
            <Setter Property="BorderThickness" Value="1" />
            <Setter Property="Foreground" Value="#101817" />
            <Setter Property="FontSize" Value="18" />
            <Setter Property="FontWeight" Value="SemiBold" />
            <Setter Property="Cursor" Value="Hand" />
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                CornerRadius="6">
                            <ContentPresenter HorizontalAlignment="Center"
                                              VerticalAlignment="Center" />
                        </Border>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsMouseOver" Value="True">
                                <Setter Property="Background" Value="#EEF1EF" />
                            </Trigger>
                            <Trigger Property="IsPressed" Value="True">
                                <Setter Property="Background" Value="#C7CECA" />
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <DataTrigger Binding="{Binding IsSelected}" Value="True">
                    <Setter Property="Background" Value="#FFFFFF" />
                    <Setter Property="BorderBrush" Value="#2E6E5D" />
                    <Setter Property="BorderThickness" Value="2" />
                    <Setter Property="Foreground" Value="#12362F" />
                </DataTrigger>
            </Style.Triggers>
        </Style>
    </Application.Resources>
</Application>
