<local:MyPageRight
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:PCL" xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" x:Class="PCL.PageInstanceCompResource"
    PanScroll="{Binding ElementName=PanBack}">
    <Grid>
        <Grid x:Name="PanAllBack">
            <local:MyScrollViewer VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Disabled"
                                  x:Name="PanBack">
                <StackPanel x:Name="PanMain" Margin="25,10,25,10" Grid.IsSharedSizeScope="True"> <!-- 若显示多选模块则为 92 -->
                    <local:MySearchBox Margin="0,15" HintText="{DynamicResource Instance.Resource.Search.Hint}" x:Name="SearchBox" />
                    <local:MyCard Margin="0,0,0,15" x:Name="PanManage">
                        <WrapPanel Margin="15,8,0,15">
                            <local:MyButton x:Name="BtnManageBack" MinWidth="110" Text="{DynamicResource Instance.Resource.BackToParent}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" Visibility="Collapsed" />
                            <local:MyButton x:Name="BtnManageOpen" MinWidth="110" Text="{DynamicResource Common.Action.OpenFolder}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" ColorType="Highlight" />

                            <local:MyButton x:Name="BtnManageInstall" MinWidth="110" Text="{DynamicResource Instance.Resource.InstallFromFiles}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" />
                            <local:MyButton x:Name="BtnManageDownload" MinWidth="110" Text="{DynamicResource Instance.Resource.DownloadNew}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" />
                            <local:MyButton x:Name="BtnManageSelectAll" MinWidth="110" Text="{DynamicResource Instance.Resource.SelectAll}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" />
                            <local:MyButton x:Name="BtnManageInfoExport" MinWidth="110" Text="{DynamicResource Instance.Resource.ExportInfo}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left" ToolTip="{DynamicResource Instance.Resource.ExportInfo.ToolTip}" />
                            <local:MyButton x:Name="BtnManageCheck" MinWidth="110" Text="{DynamicResource Instance.Resource.CheckMods}" Padding="13,7"
                                            Margin="0,7,15,0" HorizontalAlignment="Left"
                                            ToolTip="{DynamicResource Instance.Resource.CheckMods.ToolTip}"
                                            Visibility="Collapsed" />
                        </WrapPanel>
                    </local:MyCard>
                    <local:MyCard x:Name="PanListBack" VerticalAlignment="Top" Opacity="0" Margin="0,0,0,14" Title=" "
                                  MinHeight="55">
                        <StackPanel x:Name="PanFilter" Margin="15,13,0,0" Orientation="Horizontal"
                                    VerticalAlignment="Top" HorizontalAlignment="Left" Height="28">
                            <local:MyRadioButton Tag="0" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.All}" x:Name="BtnFilterAll" Checked="True" />
                            <local:MyRadioButton Tag="1" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.Enabled}" x:Name="BtnFilterEnabled" />
                            <local:MyRadioButton Tag="2" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.Disabled}" x:Name="BtnFilterDisabled" />
                            <local:MyRadioButton Tag="3" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.Updatable}" x:Name="BtnFilterCanUpdate" />
                            <local:MyRadioButton Tag="4" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.Error}" x:Name="BtnFilterError" />
                            <local:MyRadioButton Tag="5" ColorType="Highlight" VerticalAlignment="Center" Margin="2,0"
                                                 Text="{DynamicResource Instance.Resource.Filter.Duplicate}" x:Name="BtnFilterDuplicate" />
                        </StackPanel>
                        <StackPanel Margin="0,13,15,0" Orientation="Horizontal" VerticalAlignment="Top"
                                    HorizontalAlignment="Right" Height="28">
                            <local:MyIconTextButton x:Name="BtnSort" Text="{DynamicResource Instance.Resource.Sort.Text}"
                                                    SvgIcon="lucide/arrow-up-down" />
                        </StackPanel>
                        <StackPanel Margin="20,48,18,22" Name="PanList" VerticalAlignment="Top" />
                    </local:MyCard>
                </StackPanel>
            </local:MyScrollViewer>
            <local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" Margin="40" x:Name="PanEmpty">
                <StackPanel Margin="20,17">
                    <TextBlock x:Name="TxtEmptyTitle" Margin="0,0,0,9" HorizontalAlignment="Center" Text="{DynamicResource Instance.Resource.Empty.Title}"
                               FontSize="19" UseLayoutRounding="True" SnapsToDevicePixels="True"
                               Foreground="{DynamicResource ColorBrush3}" />
                    <Rectangle HorizontalAlignment="Stretch" Height="2" Fill="{DynamicResource ColorBrush3}" />
                    <TextBlock x:Name="TxtEmptyDescription" Margin="10,10,10,0"
                               Text="{DynamicResource Instance.Resource.Empty.Description}" TextWrapping="Wrap" />
                    <WrapPanel Margin="10,20,10,5" HorizontalAlignment="Center" Orientation="Horizontal">
                        <local:MyButton Height="35" x:Name="BtnHintBack" MinWidth="130" Text="{DynamicResource Instance.Resource.BackToParent}" Margin="5,0"
                                        Padding="12,0" Visibility="Collapsed" />
                        <local:MyButton Height="35" x:Name="BtnHintInstall" MinWidth="130" Text="{DynamicResource Instance.Resource.InstallFromFiles}" Margin="5,0"
                                        Padding="12,0" ColorType="Highlight" />
                        <local:MyButton Height="35" x:Name="BtnHintDownload" MinWidth="130" Text="{DynamicResource Instance.Resource.DownloadNew}" Margin="5,0"
                                        Padding="12,0" />
                        <local:MyButton Height="35" x:Name="BtnHintOpen" MinWidth="130" Text="{DynamicResource Common.Action.OpenFolder}" Margin="5,0"
                                        Padding="12,0" />
                    </WrapPanel>
                </StackPanel>
            </local:MyCard>
            <local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" Margin="40"
                          x:Name="PanSchematicEmpty" Visibility="Collapsed">
                <StackPanel Margin="20,17">
                    <TextBlock Margin="0,0,0,9" HorizontalAlignment="Center" Text="{DynamicResource Instance.Resource.Schematic.Unavailable.Title}" FontSize="19"
                               UseLayoutRounding="True" SnapsToDevicePixels="True"
                               Foreground="{DynamicResource ColorBrush3}" />
                    <Rectangle HorizontalAlignment="Stretch" Height="2" Fill="{DynamicResource ColorBrush3}" />
                    <TextBlock Margin="10,10,10,0"
                               Text="{DynamicResource Instance.Resource.Schematic.Unavailable.Message}"
                               TextWrapping="Wrap" HorizontalAlignment="Center" />
                    <WrapPanel Margin="10,20,10,5" HorizontalAlignment="Center" Orientation="Horizontal">
                        <local:MyButton Height="35" x:Name="BtnSchematicDownloadMod" MinWidth="130" Text="{DynamicResource Instance.Resource.Schematic.DownloadMod}"
                                        Margin="5,0" Padding="12,0" ColorType="Highlight" />
                        <local:MyButton Height="35" x:Name="BtnSchematicVersionSelect" MinWidth="130" Text="{DynamicResource Instance.Resource.Mod.Disabled.SelectInstance}"
                                        Margin="5,0" Padding="12,0" />
                    </WrapPanel>
                </StackPanel>
            </local:MyCard>
        </Grid>
        <local:MyCard HorizontalAlignment="Center" VerticalAlignment="Center" Margin="40,0" SnapsToDevicePixels="True"
                      x:Name="PanLoad" UseAnimation="False">
            <local:MyLoading Text="{DynamicResource Instance.Resource.Loading}" Margin="20,20,20,17" x:Name="Load" HorizontalAlignment="Center"
                             VerticalAlignment="Center" />
        </local:MyCard>
        <local:MyCard x:Name="CardSelect" Visibility="Collapsed" Opacity="0"
                      HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="25,25,25,0" UseAnimation="False">
            <local:MyCard.RenderTransform>
                <TranslateTransform x:Name="TransSelect" Y="-10" />
            </local:MyCard.RenderTransform>
            <TextBlock x:Name="LabSelect" Text="" HorizontalAlignment="Center" VerticalAlignment="Top"
                       Margin="9" Foreground="{DynamicResource ColorBrush2}" />
            <StackPanel Orientation="Horizontal" Margin="5,28,5,5">
                <local:MyIconTextButton x:Name="BtnSelectUpdate" Text="{DynamicResource Instance.Resource.Update}"
                                        LogoScale="1"
                                        SvgIcon="lucide/upload" />
                <local:MyIconTextButton x:Name="BtnSelectEnable" Text="{DynamicResource Instance.Resource.Enable}"
                                        LogoScale="1.05"
                                        SvgIcon="lucide/circle-check" />
                <local:MyIconTextButton x:Name="BtnSelectDisable" Text="{DynamicResource Instance.Resource.Disable}"
                                        LogoScale="1"
                                        SvgIcon="lucide/circle-minus" />
                <local:MyIconTextButton x:Name="BtnSelectFavorites" Text="{DynamicResource Instance.Resource.Favorite}"
                                        LogoScale="1"
                                        SvgIcon="lucide/heart" />
                <local:MyIconTextButton x:Name="BtnSelectShare" Text="{DynamicResource Instance.Resource.ShareSelected}"
                                        LogoScale="1"
                                        SvgIcon="lucide/share-2" />
                <local:MyIconTextButton x:Name="BtnSelectDelete" Text="{DynamicResource Common.Action.Delete}"
                                        LogoScale="0.96"
                                        SvgIcon="lucide/trash-2" />
                <local:MyIconTextButton x:Name="BtnSelectCancel" Text="{DynamicResource Instance.Resource.CancelSelection}"
                                        LogoScale="0.8"
                                        SvgIcon="lucide/x" />
            </StackPanel>
        </local:MyCard>
    </Grid>
</local:MyPageRight>