"use strict";
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.
Object.defineProperty(exports, "__esModule", { value: true });
exports.environment = exports.local = exports.development = exports.staging = exports.production = void 0;
const tunnelServiceProperties_1 = require("./tunnelServiceProperties");
/**
 * Gets production service properties.
 */
exports.production = {
    serviceUri: `https://${tunnelServiceProperties_1.prodDnsName}/`,
    serviceAppId: tunnelServiceProperties_1.prodFirstPartyAppId,
    serviceInternalAppId: tunnelServiceProperties_1.prodThirdPartyAppId,
    gitHubAppClientId: tunnelServiceProperties_1.prodGitHubAppClientId,
};
/**
 * Gets properties for the service in the staging environment (PPE).
 */
exports.staging = {
    serviceUri: `https://${tunnelServiceProperties_1.ppeDnsName}/`,
    serviceAppId: tunnelServiceProperties_1.ppeFirstPartyAppId,
    serviceInternalAppId: tunnelServiceProperties_1.ppeThirdPartyAppId,
    gitHubAppClientId: tunnelServiceProperties_1.ppeGitHubAppClientId,
};
/**
 * Gets properties for the service in the development environment.
 */
exports.development = {
    serviceUri: `https://${tunnelServiceProperties_1.devDnsName}/`,
    serviceAppId: tunnelServiceProperties_1.devServiceAppId,
    serviceInternalAppId: tunnelServiceProperties_1.devThirdPartyAppId,
    gitHubAppClientId: tunnelServiceProperties_1.devGitHubAppClientId,
};
/**
 * Gets properties for the service when running locally.
 *
 * Uses the same service app IDs as the development environment, but a different
 * GitHub app with localhost callback URLs.
 */
exports.local = {
    serviceUri: `https://${tunnelServiceProperties_1.localDnsName}/`,
    serviceAppId: tunnelServiceProperties_1.devServiceAppId,
    serviceInternalAppId: tunnelServiceProperties_1.devThirdPartyAppId,
    gitHubAppClientId: tunnelServiceProperties_1.localGitHubAppClientId,
};
/**
 * Gets properties for the service in the specified environment.
 */
function environment(environmentName) {
    if (!environmentName) {
        throw new Error(`Invalid argument: ${environmentName}`);
    }
    switch (environmentName.toLowerCase()) {
        case 'prod':
        case 'production':
            return exports.production;
        case 'ppe':
        case 'preprod':
            return exports.staging;
        case 'dev':
        case 'development':
            return exports.development;
        case 'local':
            return exports.local;
        default:
            throw new Error(`Invalid service environment: ${environmentName}`);
    }
}
exports.environment = environment;
//# sourceMappingURL=https://main.vscode-cdn.net/sourcemaps/6a44c352bd24569c417e530095901b649960f9f8/node_modules/@microsoft/dev-tunnels-contracts/tunnelServicePropertiesStatics.js.map