/*
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License.
 */
var supportedPlatforms = ["win32"];
var supportedArchitectures = ["x64", "ia32"];
// Should be kept up to date with error status defined by MsalRuntime
var ErrorStatus;
(function (ErrorStatus) {
    ErrorStatus[ErrorStatus["Unexpected"] = 0] = "Unexpected";
    ErrorStatus[ErrorStatus["Reserved"] = 1] = "Reserved";
    ErrorStatus[ErrorStatus["InteractionRequired"] = 2] = "InteractionRequired";
    ErrorStatus[ErrorStatus["NoNetwork"] = 3] = "NoNetwork";
    ErrorStatus[ErrorStatus["NetworkTemporarilyUnavailable"] = 4] = "NetworkTemporarilyUnavailable";
    ErrorStatus[ErrorStatus["ServerTemporarilyUnavailable"] = 5] = "ServerTemporarilyUnavailable";
    ErrorStatus[ErrorStatus["ApiContractViolation"] = 6] = "ApiContractViolation";
    ErrorStatus[ErrorStatus["UserCanceled"] = 7] = "UserCanceled";
    ErrorStatus[ErrorStatus["ApplicationCanceled"] = 8] = "ApplicationCanceled";
    ErrorStatus[ErrorStatus["IncorrectConfiguration"] = 9] = "IncorrectConfiguration";
    ErrorStatus[ErrorStatus["InsufficientBuffer"] = 10] = "InsufficientBuffer";
    ErrorStatus[ErrorStatus["AuthorityUntrusted"] = 11] = "AuthorityUntrusted";
    ErrorStatus[ErrorStatus["UserSwitched"] = 12] = "UserSwitched";
    ErrorStatus[ErrorStatus["AccountUnusable"] = 13] = "AccountUnusable";
    ErrorStatus[ErrorStatus["UserDataRemovalRequired"] = 14] = "UserDataRemovalRequired";
    ErrorStatus[ErrorStatus["KeyNotFound"] = 15] = "KeyNotFound";
    ErrorStatus[ErrorStatus["AccountNotFound"] = 16] = "AccountNotFound";
})(ErrorStatus || (ErrorStatus = {}));
// Should be kept up to date with LogLevels defined by MsalRuntime
var LogLevel;
(function (LogLevel) {
    LogLevel[LogLevel["Trace"] = 1] = "Trace";
    LogLevel[LogLevel["Debug"] = 2] = "Debug";
    LogLevel[LogLevel["Info"] = 3] = "Info";
    LogLevel[LogLevel["Warning"] = 4] = "Warning";
    LogLevel[LogLevel["Error"] = 5] = "Error";
    LogLevel[LogLevel["Fatal"] = 6] = "Fatal";
})(LogLevel || (LogLevel = {}));
var unsupportedSystemError = {
    errorCode: 0,
    errorStatus: ErrorStatus.Unexpected,
    errorContext: "Platform and/or architecture are unsupported. Supported Platforms: ".concat(supportedPlatforms.join(", "), ". Supported Architectures: ").concat(supportedArchitectures.join(", "), "."),
    errorTag: 0
};
var unexpectedError = {
    errorCode: 0,
    errorStatus: ErrorStatus.Unexpected,
    errorContext: "Binaries could not be loaded. This is unexpected.",
    errorTag: 0
};
function getBinaryNotFoundError() {
    if (supportedPlatforms.includes(process.platform) && supportedArchitectures.includes(process.arch)) {
        return unexpectedError;
    }
    else {
        return unsupportedSystemError;
    }
}
var DefaultAuthParameters = /** @class */ (function () {
    function DefaultAuthParameters() {
    }
    DefaultAuthParameters.prototype.CreateAuthParameters = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetRedirectUri = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetRequestedScopes = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetDecodedClaims = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetAccessTokenToRenew = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetPopParams = function () {
        throw getBinaryNotFoundError();
    };
    DefaultAuthParameters.prototype.SetAdditionalParameter = function () {
        throw getBinaryNotFoundError();
    };
    return DefaultAuthParameters;
}());
var DefaultMsalNodeRuntime = /** @class */ (function () {
    function DefaultMsalNodeRuntime() {
        this.AuthParameters = DefaultAuthParameters;
        this.StartupError = getBinaryNotFoundError();
    }
    DefaultMsalNodeRuntime.prototype.ReadAccountByIdAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.SignInAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.SignInSilentlyAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.SignInInteractivelyAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.AcquireTokenSilentlyAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.AcquireTokenInteractivelyAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.SignOutSilentlyAsync = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.RegisterLogger = function () {
        throw getBinaryNotFoundError();
    };
    DefaultMsalNodeRuntime.prototype.DiscoverAccountsAsync = function () {
        throw getBinaryNotFoundError();
    };
    return DefaultMsalNodeRuntime;
}());
var msalNodeRuntime;
try {
    msalNodeRuntime = require("./msal-node-runtime");
}
catch (_a) {
    // If DLLs can't be loaded export stub class instance to prevent static imports from throwing
    msalNodeRuntime = new DefaultMsalNodeRuntime();
}

export { ErrorStatus, LogLevel, msalNodeRuntime };
//# sourceMappingURL=index.js.map
