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

namespace TerminalApp
{
    delegate void LastTabClosedEventArgs();

    interface IDialogPresenter
    {
        Windows.Foundation.IAsyncOperation<Windows.UI.Xaml.Controls.ContentDialogResult> ShowDialog(Windows.UI.Xaml.Controls.ContentDialog dialog);
    };

    [default_interface] runtimeclass TerminalPage : Windows.UI.Xaml.Controls.Page
    {
        TerminalPage();

        // XAML bound properties
        String ApplicationDisplayName { get; };
        String ApplicationVersion { get; };

        Boolean FocusMode { get; };
        Boolean Fullscreen { get; };
        Boolean AlwaysOnTop { get; };

        // We cannot use the default XAML APIs because we want to make sure
        // that there's only one application-global dialog visible at a time,
        // and because of GH#5224.
        IDialogPresenter DialogPresenter;

        event Windows.Foundation.TypedEventHandler<Object, String> TitleChanged;
        event Windows.Foundation.TypedEventHandler<Object, LastTabClosedEventArgs> LastTabClosed;
        event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.UIElement> SetTitleBarContent;
        event Windows.Foundation.TypedEventHandler<Object, Object> FocusModeChanged;
        event Windows.Foundation.TypedEventHandler<Object, Object> FullscreenChanged;
        event Windows.Foundation.TypedEventHandler<Object, Object> AlwaysOnTopChanged;
        event Windows.Foundation.TypedEventHandler<Object, Windows.UI.Xaml.RoutedEventArgs> Initialized;
    }
}
