<?xml version="1.0" encoding="utf-8"?>
<Page
    x:Class="AppControlManager.Pages.Logs"
    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:ui="using:CommunityToolkit.WinUI"
    xmlns:controls="using:CommunityToolkit.WinUI.Controls"
    mc:Ignorable="d">

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

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

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

<Span>
    The following are the logs that the
        <Run Foreground="{ThemeResource SystemAccentColor}">AppControl Manager</Run>
    automatically generates and stores in the <Underline>WDACConfig</Underline> folder in Program Files. The total size of the logs folder will never exceed 100MBs.
</Span>
            </TextBlock>

        </controls:WrapPanel>


        <controls:WrapPanel Orientation="Horizontal" Grid.Row="1" Margin="10" HorizontalSpacing="10" VerticalSpacing="10">
            <!-- ComboBox for selecting log files -->
            <ComboBox x:Name="LogFileComboBox"
              SelectionChanged="LogFileComboBox_SelectionChanged"
              FontSize="16" />
            <!-- Button to refresh the logs -->
            <Button x:Name="RefreshButton"
            Content="Refresh Logs"
            Click="RefreshButton_Click"
            FontSize="16"
            Style="{StaticResource AccentButtonStyle}" />
            <!-- Search TextBox -->
            <TextBox x:Name="SearchTextBox"
             PlaceholderText="Search in the logs..."
             FontSize="16" MinWidth="300" />
            <TextBlock Text="Log Text Color" VerticalAlignment="Center" />
            <!-- Color Picker for Log Text Color -->
            <controls:ColorPickerButton x:Name="TextColorPicker"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"
                                SelectedColor="CornflowerBlue"
                                Margin="5,0" />
            <TextBlock Text="Highlight Color" VerticalAlignment="Center" />
            <!-- Color Picker for Highlight Color -->
            <controls:ColorPickerButton x:Name="HighlightColorPicker"
                                HorizontalAlignment="Center"
                                VerticalAlignment="Top"
                                SelectedColor="Yellow"
                                Margin="5,0" />
        </controls:WrapPanel>

        <ScrollViewer Grid.Row="2" VerticalScrollBarVisibility="Auto">
            <!-- TextBox to display log content -->
            <TextBlock x:Name="LogContentTextBox"
                       FontFamily="Arial"
                       FontSize="18"
                       TextWrapping="Wrap"
                       Foreground="CornflowerBlue"
                       IsTextSelectionEnabled="True" />
        </ScrollViewer>
    </Grid>
</Page>