<Window
    ExtendClientAreaChromeHints="SystemChrome"
    ExtendClientAreaTitleBarHeightHint="-1"
    Height="385"
    MinHeight="320"
    MinWidth="400"
    Title="Loading..."
    Width="900"
    WindowStartupLocation="Manual"
    mc:Ignorable="d"
    x:Class="PicView.Avalonia.MacOS.Views.ImageInfoWindow"
    x:DataType="viewModels:MainViewModel"
    xmlns="https://github.com/avaloniaui"
    xmlns:buttons="clr-namespace:PicView.Avalonia.Views.UC.Buttons;assembly=PicView.Avalonia"
    xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls;assembly=PicView.Avalonia"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:main="clr-namespace:PicView.Avalonia.Views.Main;assembly=PicView.Avalonia"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels;assembly=PicView.Avalonia"
    xmlns:vm="using:PicView.Avalonia.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Design.DataContext>
        <vm:MainViewModel />
    </Design.DataContext>
    <DockPanel PointerPressed="MoveWindow">
        <DockPanel
            Background="{DynamicResource SecondaryBackgroundColor}"
            DockPanel.Dock="Top"
            Height="28"
            LastChildFill="True"
            x:Name="WindowBorder">
            <Rectangle DockPanel.Dock="Left" Width="70" />

            <customControls:IconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="errorHover"
                ClickMode="Release"
                Command="{CompiledBinding Tools.RecycleFileCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                Data="{StaticResource RecycleGeometry}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                IconHeight="17"
                IconWidth="17"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                ToolTip.Tip="{CompiledBinding Translation.DeleteFile.Value,
                                              Mode=OneWay}"
                Width="45"
                x:Name="RecycleButton" />

            <customControls:TextIconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="errorHover"
                ClickMode="Release"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                Icon="{StaticResource OffImage}"
                IconHeight="17"
                IconMargin="10,0,5,0"
                IconWidth="17"
                IsEnabled="{CompiledBinding Exif.IsExifAvailable.Value,
                                            FallbackValue=False}"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                Text="{CompiledBinding Translation.RemoveImageData.Value,
                                       Mode=OneWay}"
                TextMargin="5,0,5,0"
                x:Name="RemoveImageDataButton" />

            <customControls:TextIconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{Binding Tools.OptimizeImageCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                Icon="{StaticResource PortalImage}"
                IconHeight="17"
                IconMargin="10,0,5,0"
                IconWidth="17"
                IsEnabled="{CompiledBinding PicViewer.ShouldOptimizeImageBeEnabled.Value,
                                            Mode=OneWay}"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                Text="{CompiledBinding Translation.OptimizeImage.Value,
                                       Mode=OneWay}"
                TextMargin="5,0,5,0"
                TextMaxWidth="{CompiledBinding InfoWindow.TextBoxMaxWidth.Value}"
                ToolTip.Tip="{CompiledBinding Translation.OptimizeImage.Value,
                                              Mode=OneWay}"
                x:Name="OptimizeButton" />

            <customControls:TextIconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.OpenWithCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                Icon="{StaticResource OpenExternalImage}"
                IconHeight="17"
                IconMargin="10,0,5,0"
                IconWidth="17"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                Text="{CompiledBinding Translation.OpenWith.Value,
                                       Mode=OneWay}"
                TextMargin="5,0,5,0"
                TextMaxWidth="{CompiledBinding InfoWindow.TextBoxMaxWidth.Value}"
                ToolTip.Tip="{CompiledBinding Translation.OpenWith.Value,
                                              Mode=OneWay}"
                x:Name="OpenWithButton" />


            <customControls:IconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.DuplicateFileCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                Data="{StaticResource DuplicateGeometry}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                IconHeight="17"
                IconWidth="17"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                ToolTip.Tip="{CompiledBinding Translation.DuplicateFile.Value,
                                              Mode=OneWay}"
                Width="45"
                x:Name="DuplicateButton" />

            <customControls:IconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="1,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Tools.LocateOnDiskCommand}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                Data="{StaticResource ShowInFolderGeometry}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Height="28"
                IconHeight="17"
                IconWidth="17"
                IsVisible="{CompiledBinding InfoWindow.IsExtraButtonsEnabled.Value}"
                ToolTip.Tip="{CompiledBinding Translation.ShowInFolder.Value,
                                              Mode=OneWay}"
                Width="45"
                x:Name="LocateOnDiskButton" />

            <buttons:StarOutlineButtons
                DockPanel.Dock="Right"
                IsEnabled="{CompiledBinding Exif.IsExifAvailable.Value,
                                            FallbackValue=False}"
                x:Name="StarOutlineButtons" />

            <customControls:IconButton
                BorderBrush="{DynamicResource MainBorderColor}"
                BorderThickness="0,0,1,0"
                Classes="noBorderHover"
                Command="{CompiledBinding Exif.SetExifRating0Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                   FallbackValue=''}"
                DockPanel.Dock="Right"
                Foreground="{DynamicResource MainTextColor}"
                Icon="{StaticResource StarOffImage}"
                IconHeight="17"
                IconWidth="17"
                IsEnabled="{CompiledBinding Exif.IsExifAvailable.Value,
                                            FallbackValue=False}"
                ToolTip.Tip="{CompiledBinding Translation.RemoveStarRating.Value,
                                              Mode=OneWay}"
                Width="35"
                x:Name="RemoveRatingButton" />

            <TextBlock
                Classes="txt"
                DockPanel.Dock="Left"
                Text="{CompiledBinding Translation.ImageInfo.Value,
                                       Mode=OneWay}"
                TextAlignment="Center" />

        </DockPanel>
        <main:ImageInfoView
            Background="{DynamicResource WindowBackgroundColor}"
            DockPanel.Dock="Bottom"
            PointerPressed="MoveWindow"
            x:Name="XExifView" />
    </DockPanel>
</Window>