<?xml version="1.0" encoding="utf-8"?>
<Page
    x:Class="AppControlManager.Pages.GetSecurePolicySettings"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="using:AppControlManager.Pages"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="using:CommunityToolkit.WinUI.Controls"
    mc:Ignorable="d">

    <ScrollViewer>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
        </Grid.RowDefinitions>

        <Grid.Resources>
            <Style x:Key="GridCardStyle" TargetType="Border">
                <Style.Setters>
                    <Setter Property="Background" Value="{ThemeResource CardBackgroundFillColorDefaultBrush}" />
                    <Setter Property="BorderThickness" Value="1" />
                    <Setter Property="BorderBrush" Value="{ThemeResource CardStrokeColorDefaultBrush}" />
                    <Setter Property="CornerRadius" Value="{StaticResource OverlayCornerRadius}" />
                </Style.Setters>
            </Style>

        </Grid.Resources>



            <controls:WrapPanel Grid.Row="0" VerticalSpacing="4" HorizontalSpacing="4" Orientation="Vertical" Margin="6,10,6,10">

                <TextBlock
TextWrapping="WrapWholeWords"
Style="{StaticResource BodyTextBlockStyle}">

<Span> Retreive and query <Run Foreground="{ThemeResource SystemAccentColor}">the Secure Settings</Run>
     on the system. </Span>
                </TextBlock>

                <HyperlinkButton Content="Guide" NavigateUri="https://github.com/HotCakeX/Harden-Windows-Security/wiki/Get-Secure-Policy-Settings" />

            </controls:WrapPanel>

        <Border
Grid.Row="1"
Margin="0,10,0,10"
Style="{StaticResource GridCardStyle}" Padding="8,15,8,15">

            <controls:WrapPanel HorizontalSpacing="10" VerticalSpacing="10" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Grid.Row="1">

                    <!-- Button -->
                    <Button Content="Fetch" Click="InvokeButton_Click" Margin="0,12,5,0"
                            HorizontalAlignment="Center" Style="{StaticResource AccentButtonStyle}"/>


                    <!-- Input Fields -->
                <TextBox x:Name="ProviderTextBox" Header="Provider" PlaceholderText="Enter Provider" MinWidth="200"/>
                <TextBox x:Name="KeyTextBox" Header="Key" PlaceholderText="Enter Key" MinWidth="200"/>
                <TextBox x:Name="ValueNameTextBox" Header="Value Name" PlaceholderText="Enter Value Name" MinWidth="200"/>


            </controls:WrapPanel>

        </Border>

        <controls:WrapPanel HorizontalSpacing="10" Margin="0,15,0,15" VerticalSpacing="10" Orientation="Vertical" HorizontalAlignment="Center" Grid.Row="2">

            <!-- Result Fields -->
            <TextBlock Text="The results will be displayed below" FontWeight="Bold" />
            <TextBox x:Name="ValueTextBox" IsReadOnly="True" Header="Value" MinWidth="200" />
            <TextBox x:Name="ValueTypeTextBox" IsReadOnly="True" Header="Value Type" MinWidth="200"/>
            <TextBox x:Name="ValueSizeTextBox" IsReadOnly="True" Header="Value Size" MinWidth="200"/>
            <TextBox x:Name="StatusTextBox" IsReadOnly="True" Header="Status" MinWidth="200"/>
            <TextBox x:Name="StatusCodeTextBox" IsReadOnly="True" Header="Status Code" MinWidth="200"/>

        </controls:WrapPanel>

        <!-- InfoBar -->
        <InfoBar x:Name="InfoBar" IsOpen="False" Margin="0,20,0,0" Grid.Row="3"/>

    </Grid>

    </ScrollViewer>

</Page>
