<?xml version="1.0" encoding="utf-8" ?>
<local:UserSpacePageControlBase
    x:Class="BiliCopilot.UI.Controls.Moment.UserSpacePageBody"
    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.Moment"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">
    <UserControl.Resources>
        <DataTemplate x:Key="VideoTemplate" x:DataType="components:UserMomentDetailViewModel">
            <local:VideoMomentSpaceControl ViewModel="{x:Bind}" />
        </DataTemplate>
        <DataTemplate x:Key="ComprehensiveTemplate" x:DataType="components:UserMomentDetailViewModel">
            <local:ComprehensiveMomentSpaceControl ViewModel="{x:Bind}" />
        </DataTemplate>
        <ext:MomentSectionTemplateSelector
            x:Key="Selector"
            ComprehensiveTemplate="{StaticResource ComprehensiveTemplate}"
            VideoTemplate="{StaticResource VideoTemplate}" />
    </UserControl.Resources>

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