<UserControl x:Class="HandBrakeWPF.Views.FiltersView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Converters="clr-namespace:HandBrakeWPF.Converters" mc:Ignorable="d" >
    <UserControl.Resources>
        <Converters:BooleanToVisibilityConverter x:Key="boolToVisConverter" />
    </UserControl.Resources>

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <TextBlock Text="Filters" FontWeight="Bold" Margin="10,5,0,0" Grid.Row="0" ></TextBlock>

        <StackPanel Orientation="Vertical" Grid.Row="1" Margin="10,10,0,0">
            <Grid>
                <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="100" />
                    <ColumnDefinition Width="130" />
                    <ColumnDefinition Width="Auto" />
                </Grid.ColumnDefinitions>

                <TextBlock Text="Detelecine:" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />
                <ComboBox Width="120" Grid.Row="0" ItemsSource="{Binding DetelecineOptions}" SelectedItem="{Binding SelectedDetelecine}" Grid.Column="1" Margin="0,0,0,10"/>
                <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine}"
                         Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>

                <TextBlock Text="Decomb:" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10"/>
                <ComboBox Width="120" Grid.Row="1" ItemsSource="{Binding DecombOptions}" SelectedItem="{Binding SelectedDecomb}" Grid.Column="1" Margin="0,0,0,10"/>
                <TextBox Width="120" Grid.Row="1" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDecomb}"
                         Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" />

                <TextBlock Text="Deinterlace:" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10"/>
                <ComboBox Width="120" Grid.Row="2" ItemsSource="{Binding DeInterlaceOptions}" SelectedItem="{Binding SelectedDeInterlace}" Grid.Column="1" Margin="0,0,0,10"/>
                <TextBox Width="120" Grid.Row="2" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDeinterlace}"
                         Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" />

                <TextBlock Text="Denoise:" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
                <ComboBox Width="120" Grid.Row="3" ItemsSource="{Binding DenoiseOptions}" SelectedItem="{Binding SelectedDenoise}" Grid.Column="1" Margin="0,0,0,10"/>
                <TextBox Width="120" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDenoise}"
                         Visibility="{Binding ShowDenoiseCustom, Converter={StaticResource boolToVisConverter}}" />

                <TextBlock Text="Deblock:" Grid.Row="4" Grid.Column="0" Margin="0,0,0,10"/>
                <Slider Width="120" Value="{Binding DeblockValue}" Minimum="4" Maximum="15" Grid.Row="4" Grid.Column="1" Margin="0,0,0,10"/>
                <TextBlock Text="{Binding DeblockText}" Grid.Row="4" Grid.Column="2" Margin="0,0,0,10"/>

                <CheckBox Content="Grayscale" IsChecked="{Binding Grayscale}" Grid.Row="5" Grid.Column="1" Margin="0,0,0,10"/>
            </Grid>

        </StackPanel>

    </Grid>
</UserControl>
