<reactiveui:ReactiveWindow
    x:Class="v2rayN.Views.RoutingRuleDetailsWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:materialDesign="http://materialdesigninxaml.net/winfx/xaml/themes"
    xmlns:reactiveui="http://reactiveui.net"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    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.menuRoutingRuleDetailsSetting}"
    Width="900"
    Height="700"
    x:TypeArguments="vms:RoutingRuleDetailsViewModel"
    ShowInTaskbar="False"
    Style="{StaticResource WindowGlobal}"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <DockPanel>
        <Grid Margin="{StaticResource Margin8}" DockPanel.Dock="Top">
            <Grid.RowDefinitions>
                <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="Auto" />
                <ColumnDefinition Width="Auto" />
            </Grid.ColumnDefinitions>

            <TextBlock
                Grid.Row="0"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="{x:Static resx:ResUI.LvRemarks}" />
            <TextBox
                x:Name="txtRemarks"
                Grid.Row="0"
                Grid.Column="1"
                Width="200"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left"
                Style="{StaticResource DefTextBox}" />
            <ToggleButton
                x:Name="togEnabled"
                Grid.Row="0"
                Grid.Column="2"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left" />

            <TextBlock
                Grid.Row="1"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="outboundTag" />
            <ComboBox
                x:Name="cmbOutboundTag"
                Grid.Row="1"
                Grid.Column="1"
                Width="200"
                Margin="{StaticResource Margin4}"
                MaxDropDownHeight="1000"
                Style="{StaticResource DefComboBox}" />
            <TextBlock
                Grid.Row="1"
                Grid.Column="2"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left"
                Style="{StaticResource ToolbarTextBlock}"
                Text="{x:Static resx:ResUI.TbRuleMatchingTips}" />

            <TextBlock
                Grid.Row="2"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="port" />
            <TextBox
                x:Name="txtPort"
                Grid.Row="2"
                Grid.Column="1"
                Width="200"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left"
                Style="{StaticResource DefTextBox}" />
            <TextBlock
                Grid.Row="2"
                Grid.Column="2"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}">
                <Hyperlink Click="linkRuleobjectDoc_Click">
                    <TextBlock Text="{x:Static resx:ResUI.TbRuleobjectDoc}" />
                    <materialDesign:PackIcon Kind="Link" />
                </Hyperlink>
            </TextBlock>

            <TextBlock
                Grid.Row="3"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="protocol" />
            <ListBox
                x:Name="clbProtocol"
                Grid.Row="3"
                Grid.Column="1"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left"
                FontSize="{DynamicResource StdFontSize}"
                Style="{StaticResource MaterialDesignFilterChipPrimaryListBox}" />

            <TextBlock
                Grid.Row="4"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="inboundTag" />
            <ListBox
                x:Name="clbInboundTag"
                Grid.Row="4"
                Grid.Column="1"
                Margin="{StaticResource Margin4}"
                FontSize="{DynamicResource StdFontSize}"
                Style="{StaticResource MaterialDesignFilterChipPrimaryListBox}" />

            <TextBlock
                Grid.Row="5"
                Grid.Column="0"
                Margin="{StaticResource Margin4}"
                VerticalAlignment="Center"
                Style="{StaticResource ToolbarTextBlock}"
                Text="network" />
            <ComboBox
                x:Name="cmbNetwork"
                Grid.Row="5"
                Grid.Column="1"
                Width="200"
                Margin="{StaticResource Margin4}"
                MaxDropDownHeight="1000"
                Style="{StaticResource DefComboBox}" />

            <TextBlock
                Grid.Row="5"
                Grid.Column="2"
                Margin="{StaticResource Margin4}"
                HorizontalAlignment="Left"
                Style="{StaticResource ToolbarTextBlock}"
                Text="{x:Static resx:ResUI.TbRoutingTips}" />
        </Grid>

        <StackPanel
            Margin="{StaticResource Margin8}"
            HorizontalAlignment="Right"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
            <StackPanel
                Width="600"
                HorizontalAlignment="Center"
                VerticalAlignment="Center">
                <CheckBox x:Name="chkAutoSort">
                    <TextBlock Style="{StaticResource ToolbarTextBlock}" Text="{x:Static resx:ResUI.TbAutoSort}" />
                </CheckBox>
            </StackPanel>
            <Button
                x:Name="btnSave"
                Width="100"
                Content="{x:Static resx:ResUI.TbConfirm}"
                Cursor="Hand"
                IsDefault="True"
                Style="{StaticResource DefButton}" />
            <Button
                x:Name="btnCancel"
                Width="100"
                Margin="{StaticResource MarginLeftRight8}"
                Content="{x:Static resx:ResUI.TbCancel}"
                Cursor="Hand"
                IsCancel="true"
                Style="{StaticResource DefButton}" />
        </StackPanel>

        <Grid Margin="{StaticResource Margin8}">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="1*" />
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="1*" />
                <ColumnDefinition Width="10" />
                <ColumnDefinition Width="1*" />
            </Grid.ColumnDefinitions>
            <GroupBox
                Grid.Column="0"
                Header="{x:Static resx:ResUI.TbRoutingRuleDomain}"
                Style="{StaticResource MyGroupBox}">
                <TextBox
                    Name="txtDomain"
                    AcceptsReturn="True"
                    Style="{StaticResource DefTextBox}"
                    TextWrapping="Wrap"
                    VerticalScrollBarVisibility="Auto" />
            </GroupBox>
            <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
            <GroupBox
                Grid.Column="2"
                Header="{x:Static resx:ResUI.TbRoutingRuleIP}"
                Style="{StaticResource MyGroupBox}">
                <TextBox
                    Name="txtIP"
                    AcceptsReturn="True"
                    Style="{StaticResource DefTextBox}"
                    TextWrapping="Wrap"
                    VerticalScrollBarVisibility="Auto" />
            </GroupBox>
            <GridSplitter Grid.Column="3" HorizontalAlignment="Stretch" />
            <GroupBox
                Grid.Column="4"
                Header="{x:Static resx:ResUI.TbRoutingRuleProcess}"
                Style="{StaticResource MyGroupBox}">
                <TextBox
                    Name="txtProcess"
                    AcceptsReturn="True"
                    Style="{StaticResource DefTextBox}"
                    TextWrapping="Wrap"
                    VerticalScrollBarVisibility="Auto" />
            </GroupBox>
        </Grid>
    </DockPanel>
</reactiveui:ReactiveWindow>