<reactiveui:ReactiveUserControl
    x:Class="v2rayN.Views.BackupAndRestoreView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:converters="clr-namespace:v2rayN.Converters"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:reactiveui="http://reactiveui.net"
    xmlns:resx="clr-namespace:ServiceLib.Resx;assembly=ServiceLib"
    xmlns:vms="clr-namespace:ServiceLib.ViewModels;assembly=ServiceLib"
    d:DesignHeight="600"
    d:DesignWidth="800"
    x:TypeArguments="vms:BackupAndRestoreViewModel"
    Style="{StaticResource ViewGlobal}"
    mc:Ignorable="d">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <DockPanel Margin="{StaticResource Margin8}">
        <DockPanel Margin="{StaticResource Margin8}" DockPanel.Dock="Bottom">
            <TextBlock
                x:Name="txtMsg"
                Margin="{StaticResource Margin8}"
                HorizontalAlignment="Left"
                Style="{StaticResource ToolbarTextBlock}" />
        </DockPanel>

        <StackPanel>
            <materialDesign:Card Width="Auto" Margin="{StaticResource Margin8}">
                <Grid Margin="{StaticResource Margin8}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="300" />
                        <ColumnDefinition Width="200" />
                    </Grid.ColumnDefinitions>
                    <TextBlock
                        Grid.Row="0"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        Style="{StaticResource ModuleTitle}"
                        Text="{x:Static resx:ResUI.menuLocalBackupAndRestore}" />

                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.menuLocalBackup}" />
                    <Button
                        x:Name="menuLocalBackup"
                        Grid.Row="1"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Content="{x:Static resx:ResUI.menuLocalBackup}"
                        Style="{StaticResource DefButton}" />

                    <Separator
                        Grid.Row="2"
                        Grid.ColumnSpan="2"
                        Style="{StaticResource MaterialDesignLightSeparator}" />

                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.menuLocalRestore}" />
                    <Button
                        x:Name="menuLocalRestore"
                        Grid.Row="3"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Content="{x:Static resx:ResUI.menuLocalRestore}"
                        Style="{StaticResource DefButton}" />
                </Grid>
            </materialDesign:Card>
            <materialDesign:Card Width="Auto" Margin="{StaticResource Margin8}">
                <Grid Margin="{StaticResource Margin8}">
                    <Grid.RowDefinitions>
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                        <RowDefinition Height="Auto" />
                    </Grid.RowDefinitions>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="300" />
                        <ColumnDefinition Width="200" />
                    </Grid.ColumnDefinitions>
                    <StackPanel Orientation="Horizontal">
                        <TextBlock
                            Grid.Row="0"
                            Grid.Column="0"
                            Margin="{StaticResource Margin8}"
                            Style="{StaticResource ModuleTitle}"
                            Text="{x:Static resx:ResUI.menuRemoteBackupAndRestore}" />

                        <materialDesign:PopupBox
                            HorizontalAlignment="Right"
                            StaysOpen="True"
                            Style="{StaticResource MaterialDesignToolForegroundPopupBox}">
                            <StackPanel Margin="{StaticResource Margin8}">
                                <Grid>
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                        <RowDefinition Height="Auto" />
                                    </Grid.RowDefinitions>
                                    <Grid.ColumnDefinitions>
                                        <ColumnDefinition Width="Auto" />
                                        <ColumnDefinition Width="300" />
                                    </Grid.ColumnDefinitions>
                                    <TextBlock
                                        Grid.Row="0"
                                        Grid.Column="0"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource ToolbarTextBlock}"
                                        Text="{x:Static resx:ResUI.LvWebDavUrl}" />

                                    <TextBox
                                        x:Name="txtWebDavUrl"
                                        Grid.Row="0"
                                        Grid.Column="1"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource DefTextBox}"
                                        TextWrapping="Wrap" />

                                    <TextBlock
                                        Grid.Row="1"
                                        Grid.Column="0"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource ToolbarTextBlock}"
                                        Text="{x:Static resx:ResUI.LvWebDavUserName}" />

                                    <TextBox
                                        x:Name="txtWebDavUserName"
                                        Grid.Row="1"
                                        Grid.Column="1"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource DefTextBox}" />

                                    <TextBlock
                                        Grid.Row="2"
                                        Grid.Column="0"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource ToolbarTextBlock}"
                                        Text="{x:Static resx:ResUI.LvWebDavPassword}" />

                                    <TextBox
                                        x:Name="txtWebDavPassword"
                                        Grid.Row="2"
                                        Grid.Column="1"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource DefTextBox}" />

                                    <TextBlock
                                        Grid.Row="3"
                                        Grid.Column="0"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource ToolbarTextBlock}"
                                        Text="{x:Static resx:ResUI.LvWebDavDirName}" />

                                    <TextBox
                                        x:Name="txtWebDavDirName"
                                        Grid.Row="3"
                                        Grid.Column="1"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Style="{StaticResource DefTextBox}" />

                                    <Button
                                        x:Name="menuWebDavCheck"
                                        Grid.Row="4"
                                        Grid.Column="1"
                                        Margin="{StaticResource Margin8}"
                                        VerticalAlignment="Center"
                                        Content="{x:Static resx:ResUI.LvWebDavCheck}"
                                        Style="{StaticResource DefButton}" />
                                </Grid>
                            </StackPanel>
                        </materialDesign:PopupBox>
                    </StackPanel>

                    <TextBlock
                        Grid.Row="1"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.menuRemoteBackup}" />
                    <Button
                        x:Name="menuRemoteBackup"
                        Grid.Row="1"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Content="{x:Static resx:ResUI.menuRemoteBackup}"
                        Style="{StaticResource DefButton}" />

                    <Separator
                        Grid.Row="2"
                        Grid.ColumnSpan="3"
                        Style="{StaticResource MaterialDesignLightSeparator}" />
                    <TextBlock
                        Grid.Row="3"
                        Grid.Column="0"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.menuRemoteRestore}" />
                    <Button
                        x:Name="menuRemoteRestore"
                        Grid.Row="3"
                        Grid.Column="1"
                        Margin="{StaticResource Margin8}"
                        VerticalAlignment="Center"
                        Content="{x:Static resx:ResUI.menuRemoteRestore}"
                        Style="{StaticResource DefButton}" />
                </Grid>
            </materialDesign:Card>
        </StackPanel>
    </DockPanel>
</reactiveui:ReactiveUserControl>
