<?xml version="1.0" encoding="utf-8" ?>
<local:FavoritesPageControlBase
    x:Class="BiliCopilot.UI.Controls.Favorites.FavoritesPageMainBody"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:components="using:BiliCopilot.UI.ViewModels.Components"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:local="using:BiliCopilot.UI.Controls.Favorites"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <UserControl.Resources>
        <DataTemplate x:Key="PgcTemplate" x:DataType="components:PgcFavoriteSectionDetailViewModel">
            <local:PgcFavoriteBody ViewModel="{x:Bind}" />
        </DataTemplate>
        <DataTemplate x:Key="VideoTemplate" x:DataType="components:VideoFavoriteSectionDetailViewModel">
            <local:VideoFavoriteBody ViewModel="{x:Bind}" />
        </DataTemplate>
        <DataTemplate x:Key="UgcTemplate" x:DataType="components:UgcSeasonFavoriteSectionDetailViewModel">
            <local:UgcFavoriteBody ViewModel="{x:Bind}" />
        </DataTemplate>
        <ext:FavoriteSectionTemplateSelector
            x:Key="Selector"
            PgcTemplate="{StaticResource PgcTemplate}"
            UgcTemplate="{StaticResource UgcTemplate}"
            VideoTempalte="{StaticResource VideoTemplate}" />
    </UserControl.Resources>

    <Grid>
        <ContentControl
            Content="{x:Bind ViewModel.CurrentSection, Mode=OneWay}"
            ContentTemplateSelector="{StaticResource Selector}"
            Style="{StaticResource AppContentControlStyle}" />
    </Grid>
</local:FavoritesPageControlBase>
