<?xml version="1.0" encoding="UTF-8" ?>
<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:viewmodel="clr-namespace:XamarinDemoApp.ViewModels"
    x:DataType="viewmodel:LoginViewModel"
    x:Class="XamarinDemoApp.Views.LoginPage">
    <StackLayout Orientation="Vertical" Spacing="20" Padding="0" Margin="0,30,0,0">
        <Label 
            Text="Please Log in"
            VerticalOptions="Center" 
            HorizontalOptions="Center"
            FontSize="28"/>
        <Picker HorizontalOptions="CenterAndExpand"
                VerticalOptions="Center"
                WidthRequest="300"
                HeightRequest="40"
                HorizontalTextAlignment="Center"
                SelectedItem="{Binding IdentityType}"
                x:Name="IdentityTypePicker" Title="Select a type">
            <Picker.ItemsSource>
                <x:Array Type="{x:Type x:String}">
                    <x:String>customer_id</x:String>
                    <x:String>email_id</x:String>
                    <x:String>login_id</x:String>
                </x:Array>

            </Picker.ItemsSource>

        </Picker>

        <Grid Padding="20, 10">
            <Grid.RowDefinitions>
                <RowDefinition Height="3"/>
				<RowDefinition Height="40"/>
				<RowDefinition Height="3"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="24"/>
				<ColumnDefinition Width="300"/>

            </Grid.ColumnDefinitions>

            <Frame HasShadow="False" CornerRadius="3" BackgroundColor="White" Grid.Row="0" Grid.RowSpan="3" Grid.Column="0" Grid.ColumnSpan="5"/>
				<Image Source="user.png" Grid.Row="1" Grid.Column="0" Margin="2"/>
				<Entry FontSize="16" Margin="5,0,0,0" TextColor="#2c2a29" VerticalOptions="CenterAndExpand"
                       HeightRequest="40" HorizontalTextAlignment="Center"
                    PlaceholderColor="LightGray" x:Name="IdentityValueEntry"  Placeholder="Enter ID" Grid.Row="0" 
					Grid.RowSpan="3" Grid.Column="1" Grid.ColumnSpan="1" BackgroundColor="Transparent"
                    Text="{Binding IdentityValue}">
				</Entry>

        </Grid>
        <Button HeightRequest="40" x:Name="LoginButton" Command="{Binding LoginCommand}" Margin="40,0,40,10"  CornerRadius="5"
								FontSize="16" TextColor="White" TextTransform="None" Text="Log In"  />
    </StackLayout>
</ContentPage>

