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

namespace TerminalApp
{
    // See IDialogPresenter and TerminalPage's DialogPresenter for more
    // information.
    [default_interface] runtimeclass AppLogic
    {
        AppLogic();

        // For your own sanity, it's better to do setup outside the ctor.
        // If you do any setup in the ctor that ends up throwing an exception,
        // then it might look like TermApp just failed to activate, which will
        // cause you to chase down the rabbit hole of "why is TermApp not
        // registered?" when it definitely is.
        void Create();

        Boolean IsRunningElevated();
        Boolean CanDragDrop();

        ContentManager ContentManager { get; };

        Boolean HasSettingsStartupActions();

        void ReloadSettings();
        void ReloadSettingsThrottled();
        Microsoft.Terminal.Settings.Model.CascadiaSettings Settings { get; };

        TerminalWindow CreateNewWindow();

        IMapView<Microsoft.Terminal.Control.KeyChord, Microsoft.Terminal.Settings.Model.Command> GlobalHotkeys();

        event Windows.Foundation.TypedEventHandler<Object, SettingsLoadEventArgs> SettingsChanged;

    }
}
