<Window 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"
        mc:Ignorable="d" d:DesignWidth="900" d:DesignHeight="200"
		MinWidth="900" MinHeight="750"
		Width="900" Height="750"
        x:Class="LibationAvalonia.Dialogs.SettingsDialog"
        xmlns:controls="clr-namespace:LibationAvalonia.Controls"
        xmlns:settings="clr-namespace:LibationAvalonia.Controls.Settings"
        xmlns:vm="clr-namespace:LibationAvalonia.ViewModels.Settings"
		x:DataType="vm:SettingsVM"
        Title="Edit Settings">

	<Grid RowDefinitions="*,Auto">

		<Button
			Grid.Row="1"
			Margin="10"
			HorizontalAlignment="Right"
			Classes="SaveButton"
			Content="Save"
			Name="saveBtn"
			Click="SaveButton_Clicked" />

		<TabControl Name="tabControl" Grid.Column="0">
			<TabControl.Styles>
				<Style Selector="TabControl /template/ ItemsPresenter#PART_ItemsPresenter">
					<Setter Property="Height" Value="30"/>
				</Style>
				<Style Selector="TabControl /template/ ContentPresenter#PART_SelectedContentHost">
					<Setter Property="BorderBrush" Value="{DynamicResource SystemBaseLowColor}" />
					<Setter Property="BorderThickness" Value="1" />
				</Style>
				<Style Selector="TabItem">
					<Setter Property="MinHeight" Value="45"/>
					<Setter Property="Height" Value="45"/>
					<Setter Property="Padding" Value="8,2,8,10"/>
					<Style Selector="^ > TextBlock" >
						<Setter Property="FontSize" Value="14" />
						<Setter Property="VerticalAlignment" Value="Center" />
					</Style>
				</Style>
			</TabControl.Styles>

			<TabItem>
				<TabItem.Header>
					<TextBlock Text="Important Settings"/>
				</TabItem.Header>

				<ScrollViewer VerticalScrollBarVisibility="Auto">
					<settings:Important DataContext="{CompiledBinding ImportantSettings}" />
				</ScrollViewer>
			</TabItem>
			<TabItem>
				<TabItem.Header>
					<TextBlock Text="Import Library"/>
				</TabItem.Header>

				<ScrollViewer VerticalScrollBarVisibility="Auto">
					<settings:Import DataContext="{CompiledBinding ImportSettings}" />
				</ScrollViewer>
			</TabItem>

			<TabItem>
				<TabItem.Header>
					<TextBlock Text="Download/Decrypt"/>
				</TabItem.Header>
				
				<ScrollViewer VerticalScrollBarVisibility="Auto">
					<settings:DownloadDecrypt DataContext="{CompiledBinding DownloadDecryptSettings}" />
				</ScrollViewer>
			</TabItem>
			
			<TabItem>
				<TabItem.Header>
					<TextBlock Text="Audio File Settings"/>
				</TabItem.Header>
				<ScrollViewer VerticalScrollBarVisibility="Auto">
					<settings:Audio DataContext="{CompiledBinding AudioSettings}" />
				</ScrollViewer>
			</TabItem>
		</TabControl>
	</Grid>
</Window>
