<?xml version="1.0" encoding="utf-8" ?>
<local:ArticlePartitionPageBase
    x:Class="BiliCopilot.UI.Pages.ArticlePartitionPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:articlepartition="using:BiliCopilot.UI.Controls.Article"
    xmlns:base="using:Richasy.WinUIKernel.Share.Base"
    xmlns:components="using:BiliCopilot.UI.Controls.Components"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:ext="using:BiliCopilot.UI.Extensions"
    xmlns:local="using:BiliCopilot.UI.Pages"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="56" />
            <RowDefinition Height="Auto" />
            <RowDefinition />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="{x:Bind ViewModel.NavColumnWidth, Mode=OneWay, Converter={StaticResource GridLengthConverter}}" />
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        <Grid.ChildrenTransitions>
            <RepositionThemeTransition IsStaggeringEnabled="False" />
        </Grid.ChildrenTransitions>
        <Border
            Grid.Row="1"
            Grid.ColumnSpan="3"
            Height="1"
            HorizontalAlignment="Stretch"
            Background="{ThemeResource DividerStrokeColorDefaultBrush}" />
        <TextBlock
            Margin="16,0,-6,0"
            VerticalAlignment="Center"
            Style="{StaticResource BodyStrongTextBlockStyle}"
            Text="{ext:Locale Name=Article}"
            Visibility="{x:Bind ViewModel.IsNavColumnManualHide, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
        <articlepartition:ArticlePartitionSideBody
            Grid.Row="2"
            Margin="0,0,-6,0"
            Visibility="{x:Bind ViewModel.IsNavColumnManualHide, Mode=OneWay, Converter={StaticResource BoolToVisibilityReverseConverter}}" />
        <articlepartition:ArticlePartitionMainHeader
            Grid.Column="2"
            Margin="-6,0,0,0"
            ViewModel="{x:Bind ViewModel.SelectedPartition, Mode=OneWay}" />
        <articlepartition:ArticlePartitionMainBody
            Grid.Row="2"
            Grid.Column="2"
            Margin="-6,0,0,0"
            ViewModel="{x:Bind ViewModel.SelectedPartition, Mode=OneWay}" />

        <!--  左侧分栏大小控制器  -->
        <base:ColumnSplitter
            Grid.RowSpan="3"
            Grid.Column="1"
            ColumnWidth="{x:Bind ViewModel.NavColumnWidth, Mode=TwoWay}"
            HideTip="{ext:Locale Name=Show}"
            IsHide="{x:Bind ViewModel.IsNavColumnManualHide, Mode=TwoWay}"
            ShowTip="{ext:Locale Name=Hide}" />
    </Grid>
</local:ArticlePartitionPageBase>
