"use strict";
/*
 *  Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 *  SPDX-License-Identifier: Apache-2.0
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.getResearcherRole = exports.getProjectAdminRole = exports.getITAdminRole = void 0;
const workbench_core_base_1 = require("@aws/workbench-core-base");
const errors_1 = require("../errors");
const IT_ADMIN = 'ITAdmin';
const PROJECT_ADMIN = 'ProjectAdmin';
const RESEARCHER = 'Researcher';
function getITAdminRole() {
    return IT_ADMIN;
}
exports.getITAdminRole = getITAdminRole;
function getProjectAdminRole(projectId) {
    if (!projectId.startsWith(workbench_core_base_1.resourceTypeToKey.project.toLowerCase())) {
        throw new errors_1.InvalidArgumentError();
    }
    return `${projectId}#${PROJECT_ADMIN}`;
}
exports.getProjectAdminRole = getProjectAdminRole;
function getResearcherRole(projectId) {
    if (!projectId.startsWith(workbench_core_base_1.resourceTypeToKey.project.toLowerCase())) {
        throw new errors_1.InvalidArgumentError();
    }
    return `${projectId}#${RESEARCHER}`;
}
exports.getResearcherRole = getResearcherRole;
//# sourceMappingURL=roleUtils.js.map