<?xml version="1.0" encoding="utf-8" ?>
<Application xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"  
             xmlns:light="clr-namespace:Xamarin.Forms.Themes;assembly=Xamarin.Forms.Theme.Light"
             xmlns:converters="clr-namespace:eShopOnContainers.Core.Converters;assembly=eShopOnContainers.Core"
             xmlns:effects="clr-namespace:eShopOnContainers.Core.Effects;assembly=eShopOnContainers.Core"
             x:Class="eShopOnContainers.App">
    <Application.Resources>
        <ResourceDictionary MergedWith="light:LightThemeResources">

            <!-- COLORS -->
            <Color x:Key="WhiteColor">#ffffff</Color>
            <Color x:Key="BlackColor">#000000</Color>
            <Color x:Key="BackgroundColor">#F4F6FA</Color>
            <Color x:Key="AccentColor">#00857D</Color>
            <Color x:Key="LightGreenColor">#83D01B</Color>
            <Color x:Key="GreenColor">#00A69C</Color>
            <Color x:Key="DarkGreenColor">#00857D</Color>
            <Color x:Key="GrayColor">#e2e2e2</Color>
            
            <!-- FONTS -->
            <OnPlatform 
                x:Key="MontserratRegular"
                x:TypeArguments="x:String"
                iOS="Montserrat-Regular"
                Android="Montserrat-Regular.ttf#Montserrat"
                WinPhone="Assets/Fonts/Montserrat-Regular.ttf#Montserrat"/>

            <OnPlatform 
                x:Key="MontserratBold"
                x:TypeArguments="x:String"
                iOS="Montserrat-Bold"
                Android="Montserrat-Bold.ttf#Montserrat"
                WinPhone="Assets/Fonts/Montserrat-Bold.ttf#Montserrat"/>

            <OnPlatform 
                x:Key="SourceSansProRegular"
                x:TypeArguments="x:String"
                iOS="SourceSansPro-Regular"
                Android="SourceSansPro-Regular.ttf#Source Sans Pro"
                WinPhone="Assets/Fonts/SourceSansPro-Regular.ttf#Source Sans Pro"/>
            
            <!-- FONT SIZES -->
            <OnPlatform 
                x:Key="LittleSize"
                x:TypeArguments="x:Double"
                iOS="11"
                Android="12"
                WinPhone="12"/>

            <OnPlatform 
                x:Key="MidMediumSize"
                x:TypeArguments="x:Double"
                iOS="12"
                Android="14"
                WinPhone="14"/>

            <OnPlatform 
                x:Key="MediumSize"
                x:TypeArguments="x:Double"
                iOS="14"
                Android="16"
                WinPhone="16"/>

            <OnPlatform 
                x:Key="LargeSize"
                x:TypeArguments="x:Double"
                iOS="16"
                Android="18"
                WinPhone="18"/>

            <OnPlatform 
                x:Key="LargerSize"
                x:TypeArguments="x:Double"
                iOS="18"
                Android="20"
                WinPhone="20"/>

            <OnPlatform 
                x:Key="BigSize"
                x:TypeArguments="x:Double"
                iOS="20"
                Android="24"
                WinPhone="24"/>

            <OnPlatform 
                x:Key="ExtraBigSize"
                x:TypeArguments="x:Double"
                iOS="24"
                Android="32"
                WinPhone="32"/>

            <OnPlatform 
                x:Key="HugeSize"
                x:TypeArguments="x:Double"
                iOS="32"
                Android="48"
                WinPhone="48"/>
            
            <!-- CONVERTERS -->
            <converters:CountToBoolConverter x:Key="CountToBoolConverter" />
            <converters:DatetimeConverter x:Key="DatetimeConverter" />
            <converters:ImageConverter x:Key="ImageConverter" />
            <converters:ItemTappedEventArgsConverter x:Key="ItemTappedEventArgsConverter" />
            <converters:InverseCountToBoolConverter x:Key="InverseCountToBoolConverter" />
            <converters:InverseBoolConverter x:Key="InverseBoolConverter" />
            <converters:ItemsToHeightConverter x:Key="ItemsToHeightConverter" />
            <converters:ToUpperConverter x:Key="ToUpperConverter" />
			<converters:WebNavigatingEventArgsConverter x:Key="WebNavigatingEventArgsConverter" />
            
            <!-- STYLES -->
            <Style x:Key="EntryStyle"
                   TargetType="{x:Type Entry}">
                <Setter Property="FontFamily"
                        Value="{StaticResource MontserratRegular}" />
                <Setter Property="TextColor"
                        Value="{StaticResource BlackColor}" />
                <Setter Property="PlaceholderColor"
                        Value="{StaticResource BlackColor}" />
                <Setter Property="FontSize"
                        Value="{StaticResource LargeSize}" />
                <Setter Property="HorizontalOptions"
                        Value="FillAndExpand" />
                <Setter Property="FontAttributes"
                        Value="Bold" />
                <Setter Property="Opacity"
                        Value="0.6" />
                <Setter Property="effects:LineColorEffect.ApplyLineColor"
                        Value="True" />
                <Setter Property="effects:LineColorEffect.LineColor"
                        Value="{StaticResource BlackColor}" />
                <Style.Triggers>
                    <Trigger TargetType="Entry"
                             Property="IsFocused" 
                             Value="True">
                        <Setter Property="Opacity" Value="1" />
                    </Trigger>
                </Style.Triggers>
            </Style>

            <Style x:Key="UwpEntryStyle"
                   TargetType="{x:Type Entry}">
                <Setter Property="FontFamily"
                        Value="{StaticResource MontserratRegular}" />
                <Setter Property="TextColor"
                        Value="{StaticResource BlackColor}" />
                <Setter Property="PlaceholderColor"
                        Value="{StaticResource BlackColor}" />
                <Setter Property="FontSize"
                        Value="{StaticResource LargeSize}" />
                <Setter Property="HorizontalOptions"                      
                        Value="FillAndExpand" />
                <Setter Property="FontAttributes"
                        Value="Bold" />
                <Setter Property="BackgroundColor" 
                        Value="Transparent" />
                <Setter Property="Opacity"
                        Value="0.6" />
                <Setter Property="effects:LineColorEffect.ApplyLineColor"
                        Value="True" />
                <Setter Property="effects:LineColorEffect.LineColor"
                        Value="Gray" />
                <Style.Triggers>
                    <Trigger TargetType="Entry"
                       Property="IsFocused"
                       Value="True">
                        <Setter Property="Opacity" Value="1" />
                        <Setter Property="effects:LineColorEffect.LineColor"                        
                                Value="{StaticResource GreenColor}" />
                    </Trigger>
                </Style.Triggers>
            </Style>
            
            <Style TargetType="NavigationPage">
                <Setter Property="BarBackgroundColor" Value="{StaticResource GreenColor}"/>
                <Setter Property="BarTextColor" Value="{StaticResource WhiteColor}"/>
            </Style>
            
        </ResourceDictionary>
    </Application.Resources>
</Application>