<base:WindowBase
    x:Class="v2rayN.Views.SubEditWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:base="clr-namespace:v2rayN.Base"
    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"
    Title="{x:Static resx:ResUI.menuSubSetting}"
    Width="700"
    Height="650"
    x:TypeArguments="vms:SubEditViewModel"
    ShowInTaskbar="False"
    Style="{StaticResource WindowGlobal}"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Popupbox.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </Window.Resources>
    <DockPanel Margin="{StaticResource Margin8}">
        <StackPanel
            Margin="{StaticResource Margin4}"
            HorizontalAlignment="Center"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
            <Button
                x:Name="btnSave"
                Width="100"
                Content="{x:Static resx:ResUI.TbConfirm}"
                IsDefault="True"
                Style="{StaticResource DefButton}" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLeftRight8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                IsCancel="true"
                Style="{StaticResource DefButton}" />
        </StackPanel>
        <ScrollViewer
            materialDesign:ScrollViewerAssist.IsAutoHideEnabled="True"
            HorizontalScrollBarVisibility="Auto"
            VerticalScrollBarVisibility="Auto">

            <Grid>
                <Grid.RowDefinitions>
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                    <RowDefinition Height="Auto" />
                </Grid.RowDefinitions>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="Auto" />
                    <ColumnDefinition Width="400" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <TextBlock
                    Grid.Row="0"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    Style="{StaticResource ModuleTitle}"
                    Text="{x:Static resx:ResUI.menuSubscription}" />

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

                <TextBox
                    x:Name="txtRemarks"
                    Grid.Row="1"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}"
                    TextWrapping="Wrap" />

                <TextBlock
                    Grid.Row="2"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvUrl}" />
                <TextBox
                    x:Name="txtUrl"
                    Grid.Row="2"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}"
                    TextWrapping="Wrap" />

                <materialDesign:PopupBox
                    Grid.Row="2"
                    Grid.Column="2"
                    HorizontalAlignment="Left"
                    StaysOpen="True"
                    Style="{StaticResource MaterialDesignToolForegroundPopupBox}">
                    <StackPanel>
                        <TextBlock
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            Style="{StaticResource ToolbarTextBlock}"
                            Text="{x:Static resx:ResUI.LvMoreUrl}" />
                        <TextBox
                            x:Name="txtMoreUrl"
                            Width="400"
                            Margin="{StaticResource Margin4}"
                            VerticalAlignment="Center"
                            materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                            AcceptsReturn="True"
                            MinLines="4"
                            Style="{StaticResource MyOutlinedTextBox}"
                            TextWrapping="Wrap" />
                    </StackPanel>
                </materialDesign:PopupBox>

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

                <DockPanel
                    Grid.Row="3"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}">
                    <ToggleButton
                        x:Name="togEnable"
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Left"
                        DockPanel.Dock="Left" />

                    <TextBox
                        x:Name="txtAutoUpdateInterval"
                        Width="100"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                        AcceptsReturn="True"
                        DockPanel.Dock="Right"
                        Style="{StaticResource MyOutlinedTextBox}" />

                    <TextBlock
                        Margin="{StaticResource Margin4}"
                        HorizontalAlignment="Center"
                        VerticalAlignment="Center"
                        Style="{StaticResource ToolbarTextBlock}"
                        Text="{x:Static resx:ResUI.LvAutoUpdateInterval}" />
                </DockPanel>

                <TextBlock
                    Grid.Row="5"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvFilter}" />
                <TextBox
                    x:Name="txtFilter"
                    Grid.Row="5"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}" />

                <TextBlock
                    Grid.Row="6"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvConvertTarget}" />
                <ComboBox
                    x:Name="cmbConvertTarget"
                    Grid.Row="6"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvConvertTargetTip}"
                    MaxDropDownHeight="1000"
                    Style="{StaticResource MyOutlinedTextComboBox}" />

                <TextBlock
                    Grid.Row="7"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvUserAgent}" />
                <TextBox
                    x:Name="txtUserAgent"
                    Grid.Row="7"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.SubUrlTips}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}"
                    TextWrapping="Wrap" />

                <TextBlock
                    Grid.Row="8"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvSort}" />
                <TextBox
                    x:Name="txtSort"
                    Grid.Row="8"
                    Grid.Column="1"
                    Width="100"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Center"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}" />

                <TextBlock
                    Grid.Row="9"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvPrevProfile}" />
                <TextBox
                    x:Name="txtPrevProfile"
                    Grid.Row="9"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvPrevProfileTip}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}" />
                <Button
                    Grid.Row="9"
                    Grid.Column="2"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Click="BtnSelectPrevProfile_Click"
                    Content="{x:Static resx:ResUI.TbSelectProfile}"
                    Style="{StaticResource DefButton}" />

                <TextBlock
                    Grid.Row="10"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvNextProfile}" />
                <TextBox
                    x:Name="txtNextProfile"
                    Grid.Row="10"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.LvPrevProfileTip}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}" />
                <Button
                    Grid.Row="10"
                    Grid.Column="2"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Click="BtnSelectNextProfile_Click"
                    Content="{x:Static resx:ResUI.TbSelectProfile}"
                    Style="{StaticResource DefButton}" />

                <TextBlock
                    Grid.Row="11"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.TbPreSocksPort4Sub}" />
                <TextBox
                    x:Name="txtPreSocksPort"
                    Grid.Row="11"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    materialDesign:HintAssist.Hint="{x:Static resx:ResUI.TipPreSocksPort}"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}"
                    ToolTip="{x:Static resx:ResUI.TipPreSocksPort}" />

                <TextBlock
                    Grid.Row="12"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Style="{StaticResource ToolbarTextBlock}"
                    Text="{x:Static resx:ResUI.LvMemo}" />
                <TextBox
                    x:Name="txtMemo"
                    Grid.Row="12"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    AcceptsReturn="True"
                    Style="{StaticResource MyOutlinedTextBox}"
                    TextWrapping="Wrap" />
            </Grid>
        </ScrollViewer>
    </DockPanel>
</base:WindowBase>
