<?xml version="1.0" encoding="UTF-8"?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms" 
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
             x:Class="Aurora.Frontend.Components.NavigationMenu.NavigationMenu"
             Title="Navigation">
    <ContentView.Content>
        <StackLayout>
            <ListView x:Name="MenuItemsListView" 
                      SeparatorVisibility="None" 
                      HasUnevenRows="true" 
                      BackgroundColor="{StaticResource MenuBackgroundColor}"
                      IsGroupingEnabled="true"
                      CachingStrategy="RecycleElement">
                <ListView.Header>
                    <Grid BackgroundColor="#03A9F4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="10" />
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="10" />
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="30" />
                            <RowDefinition Height="80" />
                            <RowDefinition Height="Auto" />
                            <RowDefinition Height="10" />
                        </Grid.RowDefinitions>
                        <Label Grid.Column="1" Grid.Row="2" Text="Aurora" Style="{DynamicResource SubtitleStyle}" />
                    </Grid>
                </ListView.Header>
                
                <ListView.GroupHeaderTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <Label VerticalOptions="FillAndExpand" VerticalTextAlignment="Start" Text="{Binding GroupHeading}" FontSize="18" TextColor="White"/>
                        </ViewCell>   
                    </DataTemplate>
                </ListView.GroupHeaderTemplate>
                
                <ListView.ItemTemplate>
                    <DataTemplate>
                        <ViewCell>
                            <StackLayout Padding="15,10" HorizontalOptions="FillAndExpand">
                                <Label VerticalOptions="FillAndExpand" VerticalTextAlignment="Center" Text="{Binding Title}" FontSize="24" />
                            </StackLayout>
                        </ViewCell>
                    </DataTemplate>
                </ListView.ItemTemplate>
            </ListView>
        </StackLayout>
    </ContentView.Content>
</ContentPage>
