<UserControl 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:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
             xmlns:menuBar="clr-namespace:Artemis.UI.Screens.ProfileEditor.MenuBar"
             xmlns:profileEditor="clr-namespace:Artemis.UI.Shared.Services.ProfileEditor;assembly=Artemis.UI.Shared"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Screens.ProfileEditor.MenuBar.MenuBarView"
             x:DataType="menuBar:MenuBarViewModel">
    <Menu VerticalAlignment="Top" Closed="MenuBase_OnMenuClosed">
        <MenuItem Header="_File">
            <MenuItem Header="New">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Plus" />
                </MenuItem.Icon>
                <MenuItem Header="Folder" Command="{CompiledBinding AddFolder}">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Folder" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Layer" Command="{CompiledBinding AddLayer}">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Layers" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <Separator />
            <MenuItem Header="View Properties" Command="{CompiledBinding ViewProperties}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Settings" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Adapt Profile" Command="{CompiledBinding AdaptProfile}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Magic" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Suspend Profile" Command="{CompiledBinding ToggleSuspended}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding IsSuspended}" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="Export Profile" Command="{CompiledBinding ExportProfile}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Export" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Duplicate Profile" Command="{CompiledBinding DuplicateProfile}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="ContentDuplicate" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="Delete Profile" Command="{CompiledBinding DeleteProfile}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Trash" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
        <MenuItem Header="_Edit">
            <MenuItem Header="_Undo" Command="{CompiledBinding History.Undo}" InputGesture="Ctrl+Z">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Undo" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="_Redo" Command="{CompiledBinding History.Redo}" InputGesture="Ctrl+Y">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Redo" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="_Duplicate" Command="{Binding Duplicate}" InputGesture="Ctrl+D">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="ContentDuplicate" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="_Copy" Command="{Binding Copy}" InputGesture="Ctrl+C">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="ContentCopy" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="_Paste" Command="{Binding Paste}" InputGesture="Ctrl+V">
                <MenuItem.Icon>
                    <avalonia:MaterialIconExt Kind="ContentPaste" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
        <MenuItem Header="_Run">
            <MenuItem Header="_Switch run mode" Command="{CompiledBinding ToggleSuspendedEditing}" InputGesture="F5">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="SwapHorizontal" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Switch Run Mode on Focus Loss"
                      ToolTip.Tip="If enabled, run mode is set to normal on focus loss"
                      InputGesture="Shift+F5"
                      Command="{CompiledBinding ToggleBooleanSetting}"
                      CommandParameter="{CompiledBinding AutoSuspend}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding AutoSuspend.Value}" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
        <MenuItem Header="_Options">
            <MenuItem Header="Focus Mode" InputGesture="F">
                <MenuItem Header="None"
                          Command="{CompiledBinding ChangeFocusMode}"
                          CommandParameter="{x:Static profileEditor:ProfileEditorFocusMode.None}">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding FocusNone}" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Current Folder"
                          Command="{CompiledBinding ChangeFocusMode}"
                          CommandParameter="{x:Static profileEditor:ProfileEditorFocusMode.Folder}">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding FocusFolder}" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Current Selection"
                          Command="{CompiledBinding ChangeFocusMode}"
                          CommandParameter="{x:Static profileEditor:ProfileEditorFocusMode.Selection}">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding FocusSelection}" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuItem>
            <MenuItem Header="Display Data Model Values"
                      Command="{CompiledBinding ToggleBooleanSetting}"
                      CommandParameter="{CompiledBinding ShowDataModelValues}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding ShowDataModelValues.Value}" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Display Full Condition Paths"
                      Command="{CompiledBinding ToggleBooleanSetting}"
                      CommandParameter="{CompiledBinding ShowFullPaths}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding ShowFullPaths.Value}" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Always Display Cable Values"
                      ToolTip.Tip="If enabled, cable values are always shown instead of only on hover"
                      Command="{CompiledBinding ToggleBooleanSetting}"
                      CommandParameter="{CompiledBinding AlwaysShowValues}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding AlwaysShowValues.Value}" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Apply All Data Bindings During Edit"
                      ToolTip.Tip="If enabled, updates all data bindings instead of only the one you are editing"
                      Command="{CompiledBinding ToggleBooleanSetting}"
                      CommandParameter="{CompiledBinding AlwaysApplyDataBindings}">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Check" IsVisible="{CompiledBinding AlwaysApplyDataBindings.Value}" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
        <MenuItem Header="_Help">
            <MenuItem Header="Artemis Wiki" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="BookEdit" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="Editor" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/en/guides/user/profiles?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Edit" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Layers" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/layers?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Layers" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Display Conditions" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/conditions?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="NotEqual" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Timeline" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/timeline?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Stopwatch" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Data Bindings" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/data-bindings?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="VectorLink" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Scripting" Command="{CompiledBinding OpenUri}" CommandParameter="https://wiki.artemis-rgb.com/guides/user/profiles/scripting?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="CodeJson" />
                </MenuItem.Icon>
            </MenuItem>
            <Separator />
            <MenuItem Header="Report a Bug" Command="{CompiledBinding OpenUri}" CommandParameter="https://github.com/Artemis-RGB/Artemis/issues?mtm_campaign=artemis&amp;mtm_kwd=profile-editor">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Github" />
                </MenuItem.Icon>
            </MenuItem>
            <MenuItem Header="Get Help on Discord" Command="{CompiledBinding OpenUri}" CommandParameter="https://discord.gg/S3MVaC9">
                <MenuItem.Icon>
                    <avalonia:MaterialIcon Kind="Chat" />
                </MenuItem.Icon>
            </MenuItem>
        </MenuItem>
    </Menu>
</UserControl>