<Page x:Class="AutoDarkModeApp.Pages.PageScripts"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:p="clr-namespace:AutoDarkModeLib.Properties;assembly=AutoDarkModeLib"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
      xmlns:helpers="clr-namespace:AutoDarkModeApp.Handlers"
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
      xmlns:ui="http://schemas.modernwpf.com/2019"
      d:DesignHeight="900"
      d:DesignWidth="500"
      xmlns:local="clr-namespace:AutoDarkModeApp.Pages"
      xmlns:uc="clr-namespace:AutoDarkModeApp.Controls"
      mc:Ignorable="d"
      Title="PageScripts">

    <Grid Margin="0,0,0,0">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.4*" />
            <ColumnDefinition Width="10*"
                              MaxWidth="1000"
                              MinWidth="450" />
            <ColumnDefinition Width="0.4*" />
        </Grid.ColumnDefinitions>

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

        <TextBlock Grid.Row="1"
                   Grid.Column="1"
                   Margin="0,0,0,0"
                   FontFamily="Segoe UI Semilight"
                   FontSize="30"
                   Text="{x:Static p:Resources.PageScriptsTextBlockHeader}" />

        <ui:SimpleStackPanel Grid.Row="4"
                             Grid.Column="1">
            <uc:Card Margin="0,5,0,2"
                     Padding="30,15,25,15">
                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition />
                        <RowDefinition />
                    </Grid.RowDefinitions>

                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto" />
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />
                    </Grid.ColumnDefinitions>

                    <TextBlock Margin="0,0,0,0"
                               VerticalAlignment="Center"
                               Grid.Row="0"
                               Grid.Column="0"
                               FontSize="14"
                               Text="{x:Static p:Resources.PageScriptsToggle}" />

                    <ui:ToggleSwitch Name="ToggleSwitchScripts"
                                     OffContent="{x:Static p:Resources.ToggleSwitchOff}"
                                     OnContent="{x:Static p:Resources.ToggleSwitchOn}"
                                     Grid.Row="0"
                                     Grid.Column="2"
                                     Margin="0,0,0,0"
                                     HorizontalAlignment="Right"
                                     Toggled="ToggleSwitchScripts_Toggled" />
                </Grid>

            </uc:Card>

            <uc:Card Grid.Column="1"
                     Grid.Row="7"
                     Padding="30,20,5,20"
                     MouseDown="CardOpenScriptsFile_MouseDown"
                     x:Name="CardOpenConfig"
                     Cursor="Hand">

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />

                    </Grid.ColumnDefinitions>

                    <Grid Grid.Column="0"
                          Margin="0,0,0,0">
                        <Grid.RowDefinitions>
                            <RowDefinition Height="Auto" />
                        </Grid.RowDefinitions>


                        <TextBlock Grid.Row="0"
                                   Margin="0,0,0,0"
                                   VerticalAlignment="Top"
                                   HorizontalAlignment="Left"
                                   FontSize="14"
                                   Text="{x:Static p:Resources.PageScriptsButtonOpenConfig}"
                                   TextWrapping="Wrap"
                                   MaxWidth="650" />

                    </Grid>

                    <ui:FontIcon Grid.Column="3"
                                 Margin="15, 0, 10, 0"
                                 FontSize="15"
                                 Name="OpenConfigCardIcon"
                                 FontFamily="Segoe MDL2 Assets"
                                 Glyph="&#xe8a7;" />
                </Grid>
            </uc:Card>

        </ui:SimpleStackPanel>

        <ui:SimpleStackPanel Grid.Column="1"
                             Grid.Row="5">

            <TextBlock Margin="0,30,0,10"
                       Grid.Row="7"
                       Grid.Column="1"
                       FontFamily="Segoe UI Semibold"
                       FontSize="14"
                       Text="{x:Static p:Resources.Links}" />

            <uc:Card Padding="30,20,5,20"
                     MouseDown="CardDocumentationLink_MouseDown"
                     x:Name="CardDocumentationLink"
                     Cursor="Hand">

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />

                    </Grid.ColumnDefinitions>

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


                        <TextBlock Grid.Row="0"
                                   Margin="0,0,0,0"
                                   VerticalAlignment="Top"
                                   HorizontalAlignment="Left"
                                   FontSize="14"
                                   Text="{x:Static p:Resources.PageScriptsCardDocumentationTextBlock}"
                                   TextWrapping="Wrap"
                                   MaxWidth="650" />

                    </Grid>

                    <ui:FontIcon Grid.Column="3"
                                 Margin="15, 0, 10, 0"
                                 FontSize="15"
                                 Name="DocCardIcon"
                                 FontFamily="Segoe MDL2 Assets"
                                 Glyph="&#xe71b;" />


                </Grid>
            </uc:Card>

            <uc:Card Grid.Column="1"
                     Grid.Row="11"
                     Padding="30,20,5,20"
                     Margin="0,2,0,0"
                     MouseDown="CardScripts_MouseDown"
                     x:Name="CardScripts"
                     Cursor="Hand">

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*" />
                        <ColumnDefinition Width="Auto" />

                    </Grid.ColumnDefinitions>

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


                        <TextBlock Grid.Row="0"
                                   Margin="0,0,0,0"
                                   VerticalAlignment="Top"
                                   HorizontalAlignment="Left"
                                   FontSize="14"
                                   Text="{x:Static p:Resources.PageScriptsCardUserRepositoryTextBlock}"
                                   TextWrapping="Wrap"
                                   MaxWidth="650" />

                    </Grid>

                    <ui:FontIcon Grid.Column="3"
                                 Margin="15, 0, 10, 0"
                                 FontSize="15"
                                 Name="RepoCardIcon"
                                 FontFamily="Segoe MDL2 Assets"
                                 Glyph="&#xe71b;" />


                </Grid>
            </uc:Card>
        </ui:SimpleStackPanel>
    </Grid>
</Page>
