// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
import "Command.idl";
import "GlobalAppSettings.idl";

namespace Microsoft.Terminal.Settings.Model
{
    enum InfoBarMessage
    {
        // We need a sentinel value to map deleted keys to, as we can't actually delete them (GH#16874)
        IgnoredDeprecatedEntry = 0,
        CloseOnExitInfo,
        KeyboardServiceWarning,
    };

    runtimeclass WindowLayout
    {
        WindowLayout();

        static String ToJson(WindowLayout layout);
        static WindowLayout FromJson(String json);

        Windows.Foundation.Collections.IVector<ActionAndArgs> TabLayout;
        Windows.Foundation.IReference<LaunchPosition> InitialPosition;
        Windows.Foundation.IReference<Windows.Foundation.Size> InitialSize;
        Windows.Foundation.IReference<LaunchMode> LaunchMode;
    };

    [default_interface] runtimeclass ApplicationState {
        static ApplicationState SharedInstance();

        void Flush();
        void Reset();

        void AppendPersistedWindowLayout(WindowLayout layout);
        Boolean DismissBadge(String badgeId);
        Boolean BadgeDismissed(String badgeId);

        String SettingsHash;
        Windows.Foundation.Collections.IVector<WindowLayout> PersistedWindowLayouts;
        Windows.Foundation.Collections.IVector<String> RecentCommands;
        Windows.Foundation.Collections.IVector<InfoBarMessage> DismissedMessages;
        Windows.Foundation.Collections.IVector<String> AllowedCommandlines;
    }
}
