<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="PaklenaBasta.MAUI.Views.HomePage"
             Title="Home">
    <StackLayout>
        <CollectionView x:Name="FilmsCollection" SelectionMode="Single" SelectionChanged="OnSelectionChanged">
            <CollectionView.ItemTemplate>
                <DataTemplate>
                    <Frame Margin="8" Padding="8" HasShadow="True">
                        <StackLayout Orientation="Horizontal" Spacing="10">
                            <Image Source="{Binding Thumbnail}" WidthRequest="120" HeightRequest="68" Aspect="AspectFill" />
                            <VerticalStackLayout>
                                <Label Text="{Binding Title}" FontAttributes="Bold" />
                                <Label Text="{Binding Description}" LineBreakMode="TailTruncation" MaxLines="2" />
                            </VerticalStackLayout>
                        </StackLayout>
                    </Frame>
                </DataTemplate>
            </CollectionView.ItemTemplate>
        </CollectionView>
    </StackLayout>
</ContentPage>