// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

#include "AllShortcutActions.h"

import "ActionArgs.idl";
import "Profile.idl";
import "ColorScheme.idl";
import "TerminalWarnings.idl";

namespace Microsoft.Terminal.Settings.Model
{
    enum ShortcutAction
    {
        Invalid = 0, // treat Invalid as unbound actions

        // When adding a new action, add them to AllShortcutActions.h!
        #define ON_ALL_ACTIONS(action) action,
        ALL_SHORTCUT_ACTIONS
        #undef ON_ALL_ACTIONS
    };

    [default_interface] runtimeclass ActionAndArgs {
        ActionAndArgs();
        ActionAndArgs(ShortcutAction action, IActionArgs args);

        static String Serialize(IVector<ActionAndArgs> args);
        static IVector<ActionAndArgs> Deserialize(String content);

        IActionArgs Args;
        ShortcutAction Action;
    };

    [default_interface] runtimeclass Command
    {
        Command();

        String Name { get; };
        ActionAndArgs ActionAndArgs { get; };
        Microsoft.Terminal.Control.KeyChord Keys { get; };
        void RegisterKey(Microsoft.Terminal.Control.KeyChord keys);
        String KeyChordText { get; };

        String IconPath;

        Boolean HasNestedCommands { get; };
        Windows.Foundation.Collections.IMapView<String, Command> NestedCommands { get; };
    }
}
