<Window
    xmlns="https://github.com/avaloniaui"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:views="clr-namespace:Splitter_UI.Views"
    xmlns:vm="clr-namespace:Splitter_UI.ViewModels"
    xmlns:conv="clr-namespace:Splitter_UI.Converters"
    x:Class="Splitter_UI.Views.MainWindow"
    x:DataType="vm:MainViewModel"
    x:Name="Root"
    Width="1800"
    Height="870"
    Title="Splitter UI"
    Icon="avares://Splitter-UI/Assets/splitter.png">

    <Window.Resources>
        <conv:BoolInvertConverter x:Key="BoolInvertConverter"/>
    </Window.Resources>

    <DockPanel>

        <!-- Status Bar -->
        <views:StatusBarView DockPanel.Dock="Bottom"
                             DataContext="{Binding StatusBar}" />

        <Grid ColumnDefinitions="220,Auto,*,430"
              IsVisible="{Binding TransformMode, Converter={StaticResource BoolInvertConverter}}">

            <!-- File List -->
            <views:FileListView Grid.Column="0"
                                DataContext="{Binding FileList}" />

            <!-- Splitter -->
            <GridSplitter Grid.Column="1"
                          Width="6"
                          Background="#404040"
                          ResizeDirection="Columns"
                          ResizeBehavior="PreviousAndNext"
                          ShowsPreview="True" />

            <!-- Preview -->
            <views:PreviewPane Grid.Column="2"
                               DataContext="{Binding Preview}" />

            <!-- Inspector -->
            <views:InspectorPane Grid.Column="3"
                                 DataContext="{Binding Inspector}" />

        </Grid>

        <Grid ColumnDefinitions="*"
              IsVisible="{Binding TransformMode}">
            <views:ProgressView DataContext="{Binding Progress}"/>
        </Grid>

    </DockPanel>
</Window>

