"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRoleDescription = exports.isOrganizationMemberProfileWithGroups = exports.isOrganizationMemberRole = exports.OrganizationMemberRoleLabels = exports.OrganizationMemberRole = void 0;
var OrganizationMemberRole;
(function (OrganizationMemberRole) {
    OrganizationMemberRole["MEMBER"] = "member";
    OrganizationMemberRole["VIEWER"] = "viewer";
    OrganizationMemberRole["INTERACTIVE_VIEWER"] = "interactive_viewer";
    OrganizationMemberRole["EDITOR"] = "editor";
    OrganizationMemberRole["DEVELOPER"] = "developer";
    OrganizationMemberRole["ADMIN"] = "admin";
})(OrganizationMemberRole || (exports.OrganizationMemberRole = OrganizationMemberRole = {}));
exports.OrganizationMemberRoleLabels = {
    [OrganizationMemberRole.MEMBER]: 'Member',
    [OrganizationMemberRole.VIEWER]: 'Viewer',
    [OrganizationMemberRole.INTERACTIVE_VIEWER]: 'Interactive Viewer',
    [OrganizationMemberRole.EDITOR]: 'Editor',
    [OrganizationMemberRole.DEVELOPER]: 'Developer',
    [OrganizationMemberRole.ADMIN]: 'Admin',
};
const isOrganizationMemberRole = (x) => Object.values(OrganizationMemberRole).includes(x);
exports.isOrganizationMemberRole = isOrganizationMemberRole;
const isOrganizationMemberProfileWithGroups = (obj) => 'groups' in obj;
exports.isOrganizationMemberProfileWithGroups = isOrganizationMemberProfileWithGroups;
const getRoleDescription = (role) => {
    switch (role) {
        case OrganizationMemberRole.MEMBER:
            return 'No access to projects by default. Project level permissions to be set separately';
        case OrganizationMemberRole.VIEWER:
            return 'Has view only access to all projects';
        case OrganizationMemberRole.INTERACTIVE_VIEWER:
            return 'Has view access to all projects and can create new projects but cannot edit existing projects';
        case OrganizationMemberRole.EDITOR:
            return 'Can create, edit and delete projects';
        case OrganizationMemberRole.DEVELOPER:
            return 'Can create, edit and delete projects';
        case OrganizationMemberRole.ADMIN:
            return 'Full access to entire project, manage all projects and user access';
        default:
            return null;
    }
};
exports.getRoleDescription = getRoleDescription;
//# sourceMappingURL=organizationMemberProfile.js.map