<Window
    x:Class="v2rayN.Desktop.Views.SubEditWindow"
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    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="600"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <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}"
                Cursor="Hand"
                IsDefault="True" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLr8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                Cursor="Hand"
                IsCancel="True" />
        </StackPanel>
        <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">

            <Grid ColumnDefinitions="Auto,400,Auto" RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto,Auto">

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

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

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

                <TextBlock
                    Grid.Row="2"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvUrl}" />
                <TextBox
                    x:Name="txtUrl"
                    Grid.Row="2"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    TextWrapping="Wrap"
                    Watermark="{x:Static resx:ResUI.SubUrlTips}" />
                <Button
                    Grid.Row="2"
                    Grid.Column="2"
                    Width="{StaticResource IconButtonWidth}"
                    Height="{StaticResource IconButtonHeight}"
                    Margin="{StaticResource MarginLr8}"
                    Theme="{DynamicResource BorderlessButton}">
                    <Button.Content>
                        <PathIcon Data="{StaticResource building_more}" Foreground="{DynamicResource ButtonDefaultTertiaryForeground}" />
                    </Button.Content>
                    <Button.Flyout>
                        <Flyout>
                            <StackPanel>
                                <TextBlock
                                    Margin="{StaticResource Margin4}"
                                    VerticalAlignment="Center"
                                    Text="{x:Static resx:ResUI.LvMoreUrl}" />
                                <TextBox
                                    x:Name="txtMoreUrl"
                                    Width="400"
                                    MinHeight="100"
                                    Margin="{StaticResource Margin4}"
                                    HorizontalAlignment="Stretch"
                                    VerticalAlignment="Center"
                                    Classes="TextArea"
                                    MinLines="4"
                                    TextWrapping="Wrap"
                                    Watermark="{x:Static resx:ResUI.SubUrlTips}" />
                            </StackPanel>
                        </Flyout>
                    </Button.Flyout>
                </Button>

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

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

                    <TextBox
                        x:Name="txtAutoUpdateInterval"
                        Width="100"
                        Margin="{StaticResource Margin4}"
                        VerticalAlignment="Center"
                        DockPanel.Dock="Right"
                        Watermark="{x:Static resx:ResUI.SubUrlTips}" />

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

                <TextBlock
                    Grid.Row="5"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvFilter}" />
                <TextBox
                    x:Name="txtFilter"
                    Grid.Row="5"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Watermark="{x:Static resx:ResUI.SubUrlTips}" />

                <TextBlock
                    Grid.Row="6"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvConvertTarget}" />
                <ComboBox
                    x:Name="cmbConvertTarget"
                    Grid.Row="6"
                    Grid.Column="1"
                    Width="200"
                    Margin="{StaticResource Margin4}"
                    ToolTip.Tip="{x:Static resx:ResUI.LvConvertTargetTip}" />

                <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"
                    TextWrapping="Wrap"
                    Watermark="{x:Static resx:ResUI.SubUrlTips}" />

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

                <TextBlock
                    Grid.Row="9"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvPrevProfile}" />
                <TextBox
                    x:Name="txtPrevProfile"
                    Grid.Row="9"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Watermark="{x:Static resx:ResUI.LvPrevProfileTip}" />

                <TextBlock
                    Grid.Row="10"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvNextProfile}" />
                <TextBox
                    x:Name="txtNextProfile"
                    Grid.Row="10"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Watermark="{x:Static resx:ResUI.LvPrevProfileTip}" />

                <TextBlock
                    Grid.Row="11"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.TbPreSocksPort4Sub}" />
                <TextBox
                    x:Name="txtPreSocksPort"
                    Grid.Row="11"
                    Grid.Column="1"
                    Width="200"
                    Margin="{StaticResource Margin4}"
                    HorizontalAlignment="Left"
                    ToolTip.Tip="{x:Static resx:ResUI.TipPreSocksPort}"
                    Watermark="{x:Static resx:ResUI.TipPreSocksPort}" />

                <TextBlock
                    Grid.Row="12"
                    Grid.Column="0"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    Text="{x:Static resx:ResUI.LvMemo}" />
                <TextBox
                    x:Name="txtMemo"
                    Grid.Row="12"
                    Grid.Column="1"
                    Margin="{StaticResource Margin4}"
                    VerticalAlignment="Center"
                    TextWrapping="Wrap" />

            </Grid>
        </ScrollViewer>
    </DockPanel>
</Window>
