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

import "GlobalAppSettings.idl";
import "Profile.idl";
import "TerminalWarnings.idl";
import "DefaultTerminal.idl";

namespace Microsoft.Terminal.Settings.Model
{
    [default_interface] runtimeclass CascadiaSettings {
        static CascadiaSettings LoadDefaults();
        static CascadiaSettings LoadAll();

        static String SettingsPath { get; };
        static String DefaultSettingsPath { get; };
        static Boolean IsPortableMode { get; };

        static String ApplicationDisplayName { get; };
        static String ApplicationVersion { get; };

        static void ExportFile(String path, String content);

        CascadiaSettings(String userJSON, String inboxJSON);

        CascadiaSettings Copy();
        void WriteSettingsToDisk();

        String Hash { get; };

        GlobalAppSettings GlobalSettings { get; };

        Profile ProfileDefaults { get; };

        IObservableVector<Profile> AllProfiles { get; };
        IObservableVector<Profile> ActiveProfiles { get; };

        Profile DuplicateProfile(Profile sourceProfile);

        ActionMap ActionMap { get; };

        IVectorView<SettingsLoadWarnings> Warnings { get; };
        Windows.Foundation.IReference<SettingsLoadErrors> GetLoadingError { get; };
        String GetSerializationErrorMessage { get; };

        Profile CreateNewProfile();
        Profile FindProfile(Guid profileGuid);
        void UpdateColorSchemeReferences(String oldName, String newName);

        Profile GetProfileForArgs(NewTerminalArgs newTerminalArgs);

        static Boolean IsDefaultTerminalAvailable { get; };
        static Boolean IsDefaultTerminalSet { get; };
        IObservableVector<DefaultTerminal> DefaultTerminals { get; };
        DefaultTerminal CurrentDefaultTerminal;

        void ExpandCommands();
    }
}
