<Window
    x:Class="YMhut.Box.WinUI.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="YMhut Box">

    <!-- MainWindow builds the live shell in code; this XAML keeps generated fields valid. -->
    <Grid x:Name="RootLayout"
          Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
        <Grid x:Name="AppTitleBar"
              Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
            <Border x:Name="TitleDragArea"
                    Background="Transparent" />
            <TextBlock x:Name="VersionText" />
            <AutoSuggestBox x:Name="GlobalSearchBox" />
            <Button x:Name="CloudButton" />
            <Button x:Name="QuickSettingsButton" />
            <Button x:Name="ThemeToggleButton" />
        </Grid>

        <NavigationView x:Name="RootNavigation"
                        IsBackButtonVisible="Collapsed"
                        IsSettingsVisible="False"
                        PaneDisplayMode="LeftCompact"
                        Background="{ThemeResource ApplicationPageBackgroundThemeBrush}">
            <NavigationView.MenuItems>
                <NavigationViewItem x:Name="HomeNavItem"
                                    Content="首页"
                                    Tag="home">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE80F;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Name="ToolboxNavItem"
                                    Content="工具箱"
                                    Tag="toolbox">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE90F;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Name="LogsNavItem"
                                    Content="日志"
                                    Tag="logs">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE9F9;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
            </NavigationView.MenuItems>

            <NavigationView.FooterMenuItems>
                <NavigationViewItem x:Name="PluginsNavItem"
                                    Content="插件"
                                    Tag="plugins">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xECAA;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Name="FeedbackNavItem"
                                    Content="反馈"
                                    Tag="feedback">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE939;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Name="SettingsNavItem"
                                    Content="设置"
                                    Tag="settings">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE713;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
                <NavigationViewItem x:Name="AboutNavItem"
                                    Content="关于"
                                    Tag="about">
                    <NavigationViewItem.Icon>
                        <FontIcon Glyph="&#xE946;" />
                    </NavigationViewItem.Icon>
                </NavigationViewItem>
            </NavigationView.FooterMenuItems>

            <NavigationView.Content>
                <ContentControl x:Name="ContentHost" />
            </NavigationView.Content>
        </NavigationView>

        <Grid x:Name="QuickSettingsOverlay"
              Visibility="Collapsed"
              Opacity="0">
            <Border x:Name="QuickSettingsScrim"
                    Background="#66000000" />
            <Border x:Name="QuickSettingsPanel"
                    Background="{ThemeResource CardBackgroundFillColorDefaultBrush}">
                <Border.RenderTransform>
                    <TranslateTransform x:Name="QuickSettingsTransform" />
                </Border.RenderTransform>
                <StackPanel>
                    <Button x:Name="CloseQuickSettingsButton" />
                    <Button x:Name="QuickLightButton" />
                    <Button x:Name="QuickDarkButton" />
                    <ToggleSwitch x:Name="QuickAnimationSwitch" />
                    <Button x:Name="QuickFontSmallButton" />
                    <Button x:Name="QuickFontNormalButton" />
                    <Button x:Name="QuickFontLargeButton" />
                </StackPanel>
            </Border>
        </Grid>

        <StackPanel x:Name="ToastPresenter" />
    </Grid>
</Window>
