<Window
    x:Class="v2rayN.Desktop.Views.RoutingRuleDetailsWindow"
    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.menuRoutingRuleDetailsSetting}"
    Width="900"
    Height="600"
    x:DataType="vms:RoutingRuleDetailsViewModel"
    ShowInTaskbar="False"
    WindowStartupLocation="CenterScreen"
    mc:Ignorable="d">
    <DockPanel>
        <Grid
            Margin="{StaticResource Margin4}"
            ColumnDefinitions="Auto,Auto,Auto"
            DockPanel.Dock="Top"
            RowDefinitions="Auto,Auto,Auto,Auto,Auto,Auto">
            <TextBlock
                Grid.Row="0"
                Grid.Column="0"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}"
                Text="{x:Static resx:ResUI.LvRemarks}" />
            <TextBox
                x:Name="txtRemarks"
                Grid.Row="0"
                Grid.Column="1"
                Width="200"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}" />
            <ToggleSwitch
                x:Name="togEnabled"
                Grid.Row="0"
                Grid.Column="2"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}" />

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

            <TextBlock
                Grid.Row="2"
                Grid.Column="0"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}"
                Text="port" />
            <TextBox
                x:Name="txtPort"
                Grid.Row="2"
                Grid.Column="1"
                Width="200"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}" />
            <TextBlock
                Grid.Row="2"
                Grid.Column="2"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}">
                <HyperlinkButton Classes="WithIcon" Click="linkRuleobjectDoc_Click">
                    <TextBlock Text="{x:Static resx:ResUI.TbRuleobjectDoc}" />
                </HyperlinkButton>
            </TextBlock>

            <TextBlock
                Grid.Row="3"
                Grid.Column="0"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}"
                Text="protocol" />
            <ListBox
                x:Name="clbProtocol"
                Grid.Row="3"
                Grid.Column="1"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}"
                SelectionMode="Multiple,Toggle"
                Theme="{DynamicResource CardCheckGroupListBox}" />

            <TextBlock
                Grid.Row="4"
                Grid.Column="0"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}"
                Text="inboundTag" />
            <ListBox
                x:Name="clbInboundTag"
                Grid.Row="4"
                Grid.Column="1"
                Margin="{StaticResource Margin4}"
                SelectionMode="Multiple,Toggle"
                Theme="{DynamicResource CardCheckGroupListBox}" />
            <TextBlock
                Grid.Row="4"
                Grid.Column="2"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}"
                Text="{x:Static resx:ResUI.TbRoutingInboundTagTips}" />


            <TextBlock
                Grid.Row="5"
                Grid.Column="0"
                VerticalAlignment="Center"
                Margin="{StaticResource Margin4}"
                Text="network" />
            <ComboBox
                x:Name="cmbNetwork"
                Grid.Row="5"
                Grid.Column="1"
                Width="200"
                Margin="{StaticResource Margin4}"
                MaxDropDownHeight="1000" />
            <TextBlock
                Grid.Row="5"
                Grid.Column="2"
                HorizontalAlignment="Left"
                Margin="{StaticResource Margin4}"
                Text="{x:Static resx:ResUI.TbRoutingTips}" />
        </Grid>

        <StackPanel
            HorizontalAlignment="Right"
            Margin="{StaticResource Margin4}"
            DockPanel.Dock="Bottom"
            Orientation="Horizontal">
            <StackPanel
                Width="600"
                HorizontalAlignment="Center"
                VerticalAlignment="Center">
                <CheckBox x:Name="chkAutoSort">
                    <TextBlock Text="{x:Static resx:ResUI.TbAutoSort}" />
                </CheckBox>
            </StackPanel>
            <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>

        <Grid Margin="{StaticResource Margin4}" ColumnDefinitions="1*,10,1*,10,1*">
            <HeaderedContentControl
                Grid.Column="0"
                BorderBrush="Gray"
                BorderThickness="1"
                Header="{x:Static resx:ResUI.TbRoutingRuleDomain}">
                <TextBox
                    Name="txtDomain"
                    VerticalAlignment="Stretch"
                    Classes="TextArea"
                    MinLines="10"
                    TextWrapping="Wrap" />
            </HeaderedContentControl>
            <GridSplitter Grid.Column="1" HorizontalAlignment="Stretch" />
            <HeaderedContentControl
                Grid.Column="2"
                BorderBrush="Gray"
                BorderThickness="1"
                Header="{x:Static resx:ResUI.TbRoutingRuleIP}">
                <TextBox
                    Name="txtIP"
                    VerticalAlignment="Stretch"
                    Classes="TextArea"
                    MinLines="10"
                    TextWrapping="Wrap" />
            </HeaderedContentControl>
            <GridSplitter Grid.Column="3" HorizontalAlignment="Stretch" />
            <HeaderedContentControl
                Grid.Column="4"
                BorderBrush="Gray"
                BorderThickness="1"
                Header="{x:Static resx:ResUI.TbRoutingRuleProcess}">
                <TextBox
                    Name="txtProcess"
                    VerticalAlignment="Stretch"
                    Classes="TextArea"
                    MinLines="10"
                    TextWrapping="Wrap" />
            </HeaderedContentControl>
        </Grid>
    </DockPanel>
</Window>
