<?xml version="1.0" encoding="utf-8" ?>
<local:WebDavPlayerPageControlBase
    x:Class="BiliCopilot.UI.Controls.WebDav.WebDavPlayerSideBody"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="using:Richasy.WinUIKernel.Share.Base"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:items="using:BiliCopilot.UI.ViewModels.Items"
    xmlns:local="using:BiliCopilot.UI.Controls.WebDav"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <ItemsView
            x:Name="View"
            Padding="12"
            ItemsSource="{x:Bind ViewModel.Playlist, Mode=OneWay}"
            SelectionChanged="OnVideoSelectionChanged"
            SelectionMode="Single"
            SizeChanged="OnSizeChangedAsync">
            <ItemsView.ItemTemplate>
                <DataTemplate x:DataType="items:WebDavStorageItemViewModel">
                    <ItemContainer Style="{StaticResource AppItemContainerStyle}">
                        <Grid Padding="12" Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
                            <base:TrimTextBlock MaxLines="1" Text="{x:Bind Data.DisplayName, Mode=OneWay}" />
                        </Grid>
                    </ItemContainer>
                </DataTemplate>
            </ItemsView.ItemTemplate>
            <ItemsView.Layout>
                <StackLayout Spacing="8" />
            </ItemsView.Layout>
        </ItemsView>
    </Grid>
</local:WebDavPlayerPageControlBase>
