<?xml version="1.0" encoding="UTF-8" ?>
<ContentView
    x:Class="CafeTerrace.Views.Controller.FoodWideItem"
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    xmlns:d="http://xamarin.com/schemas/2014/forms/design"
    xmlns:forms="clr-namespace:FFImageLoading.Forms;assembly=FFImageLoading.Forms"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:model="clr-namespace:CafeTerrace.Models;assembly=CafeTerrace"
    xmlns:transformations="clr-namespace:FFImageLoading.Transformations;assembly=FFImageLoading.Transformations"
    mc:Ignorable="d">
    <ContentView.Content>
        <Grid>
            <Frame Padding="0" CornerRadius="8">
                <forms:CachedImage
                    Aspect="Fill"
                    Source="https://www.matchingfoodandwine.com/files/blogattachments/top/beef-wellington-a-good-match-for-merlot.jpg"
                    VerticalOptions="Start" />
            </Frame>
            <Frame
                Margin="8,0,8,-50"
                Padding="10"
                CornerRadius="8"
                HasShadow="True"
                HorizontalOptions="Center"
                VerticalOptions="End">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="Auto" />
                        </Grid.ColumnDefinitions>
                        <Label
                            FontFamily="{StaticResource ShabnameBold}"
                            FontSize="16"
                            Text="پیتزا الفردو"
                            VerticalOptions="Center" />
                        <StackLayout Grid.Column="1" Orientation="Horizontal">
                            <Label
                                FontFamily="{StaticResource ShabnameBold}"
                                FontSize="18"
                                Text="20,000"
                                TextColor="{StaticResource Orange}" />
                            <Label
                                FontFamily="{StaticResource Shabname}"
                                FontSize="14"
                                Text="تومان"
                                TextColor="{StaticResource Orange}"
                                VerticalOptions="Center" />
                        </StackLayout>
                    </Grid>
                    <CollectionView
                        Grid.Row="1"
                        FlowDirection="LeftToRight"
                        HeightRequest="20"
                        HorizontalOptions="Start">
                        <CollectionView.ItemsLayout>
                            <LinearItemsLayout
                                ItemSpacing="2"
                                Orientation="Horizontal"
                                SnapPointsAlignment="Start" />
                        </CollectionView.ItemsLayout>
                        <CollectionView.ItemsSource>
                            <x:Array Type="{x:Type x:String}">
                                <x:String>پیتزا</x:String>
                                <x:String>ساندویچ</x:String>
                                <x:String>کافی شاپ</x:String>
                            </x:Array>
                        </CollectionView.ItemsSource>
                        <CollectionView.ItemTemplate>
                            <DataTemplate>
                                <Frame
                                    Padding="15,0"
                                    BackgroundColor="{StaticResource PrimaryLighterColor}"
                                    CornerRadius="15"
                                    HasShadow="False">
                                    <Label
                                        FontSize="9"
                                        Text="{Binding .}"
                                        TextColor="{StaticResource PrimaryDarkenColor}"
                                        VerticalOptions="Center" />
                                </Frame>
                            </DataTemplate>
                        </CollectionView.ItemTemplate>
                    </CollectionView>
                    <Grid Grid.Row="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="Auto" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <Frame
                            Margin="3"
                            Padding="4,4,8,4"
                            BackgroundColor="Accent"
                            CornerRadius="20">
                            <Grid>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="Auto" />
                                    <ColumnDefinition Width="Auto" />
                                </Grid.ColumnDefinitions>
                                <Frame
                                    Padding="0"
                                    BackgroundColor="{StaticResource PrimaryColor}"
                                    CornerRadius="15"
                                    HeightRequest="24"
                                    HorizontalOptions="Start"
                                    VerticalOptions="Center"
                                    WidthRequest="24">
                                    <Label
                                        FontFamily="{StaticResource FontAwsomeFontFamily}"
                                        FontSize="10"
                                        HorizontalOptions="Center"
                                        Text="{x:Static model:FaIconFont.ShoppingCart}"
                                        TextColor="Accent"
                                        VerticalOptions="Center" />
                                </Frame>
                                <Label
                                    Grid.Column="1"
                                    FontFamily="{StaticResource ShabnameBold}"
                                    FontSize="16"
                                    Text="سفـــارش"
                                    TextColor="{StaticResource PrimaryColor}"
                                    VerticalOptions="Center" />
                            </Grid>
                        </Frame>
                    </Grid>
                </Grid>
            </Frame>
            <Frame
                Margin="8"
                Padding="13,8"
                BackgroundColor="Accent"
                CornerRadius="5"
                HorizontalOptions="Start"
                VerticalOptions="Start">
                <StackLayout Orientation="Horizontal">
                    <Label
                        FontFamily="{StaticResource MaterialFontFamily}"
                        FontSize="21"
                        Text="{x:Static model:MaterialIconFont.Star}"
                        TextColor="{StaticResource PrimaryColor}"
                        VerticalOptions="Center" />
                    <Label
                        FontFamily="{StaticResource ShabnameBold}"
                        Text="پیشنهاد سراشپز"
                        TextColor="{StaticResource PrimaryColor}" />
                </StackLayout>
            </Frame>
        </Grid>
    </ContentView.Content>
</ContentView>