/**
 * Default features for a Project. These are the features that can be enabled / disabled by the entity owner
 */
export const ProjectDefaultFeatures = {
    "hub:project:events": false,
    "hub:project:content": true,
    "hub:project:discussions": false,
};
/**
 * Project permission policies
 * @private
 */
export const ProjectPermissionPolicies = [
    {
        permission: "hub:project",
        services: ["portal"],
        licenses: ["hub-premium"],
    },
    {
        permission: "hub:project:create",
        authenticated: true,
        dependencies: ["hub:project"],
        privileges: ["portal:user:createItem"],
    },
    {
        // Anyone in AGO can view a project
        permission: "hub:project:view",
        services: ["portal"],
        authenticated: false,
        licenses: ["hub-premium", "hub-basic"],
    },
    {
        permission: "hub:project:edit",
        services: ["portal"],
        authenticated: true,
        entityEdit: true,
        licenses: ["hub-premium", "hub-basic"],
    },
    {
        permission: "hub:project:delete",
        dependencies: ["hub:project"],
        authenticated: true,
        entityDelete: true,
    },
    {
        permission: "hub:project:owner",
        dependencies: ["hub:project"],
        authenticated: true,
        entityOwner: true,
    },
    {
        permission: "hub:project:canChangeAccess",
        dependencies: ["hub:project"],
        authenticated: true,
        assertions: [
            {
                property: "context:currentUser.privileges",
                type: "contains-some",
                value: [
                    "portal:admin:shareToPublic",
                    "portal:admin:shareToOrg",
                    "portal:user:shareToPublic",
                    "portal:user:shareToOrg",
                ],
            },
            {
                property: "entity:itemControl",
                type: "eq",
                value: "admin",
            },
        ],
    },
    {
        permission: "hub:project:events",
        dependencies: ["hub:project:view"],
        entityConfigurable: true,
    },
    {
        permission: "hub:project:content",
        dependencies: ["hub:project:edit"],
    },
    {
        permission: "hub:project:discussions",
        dependencies: ["hub:project:view"],
    },
    {
        permission: "hub:project:associations",
        dependencies: ["hub:project:view"],
    },
    {
        permission: "hub:project:workspace",
    },
    {
        permission: "hub:project:workspace:overview",
        dependencies: ["hub:project:workspace", "hub:project:view"],
    },
    {
        permission: "hub:project:workspace:dashboard",
        dependencies: ["hub:project:workspace", "hub:project:view"],
    },
    {
        permission: "hub:project:workspace:details",
        dependencies: ["hub:project:workspace", "hub:project:edit"],
    },
    {
        permission: "hub:project:workspace:initiatives",
        dependencies: [
            "hub:project:workspace",
            "hub:project:associations",
            "hub:project:edit",
        ],
    },
    {
        permission: "hub:project:workspace:settings",
        dependencies: ["hub:project:workspace", "hub:project:edit"],
    },
    {
        permission: "hub:project:workspace:collaborators",
        dependencies: ["hub:project:workspace", "hub:project:edit"],
    },
    {
        permission: "hub:project:workspace:metrics",
        dependencies: ["hub:project:workspace", "hub:project:edit"],
    },
    {
        permission: "hub:project:workspace:catalog",
        dependencies: ["hub:project:workspace", "hub:project:edit"],
    },
    {
        permission: "hub:project:workspace:catalog:content",
        dependencies: ["hub:project:workspace:catalog"],
    },
    {
        permission: "hub:project:workspace:catalog:events",
        dependencies: ["hub:project:workspace:catalog", "hub:event"],
    },
    {
        permission: "hub:project:manage",
        dependencies: ["hub:project:edit"],
    },
    // Permission to allow configuration of a project view's
    // cards (e.g. featured embed, featured image, featured
    // content, etc.) from the workspace. Once configurable
    // views are released, we will no longer allow configuration
    // from the workspace because the cards will be editable
    // directly from the view. This permission policy will deny
    // access on PROD starting after the retireAfter date
    {
        permission: "hub:project:workspace:edit:cardProps",
        // TODO: update once we have a definitive date (e.g.,
        // 90 days after the configurable views release). This
        // date is currently for QA purposes only.
        retireAfter: "2028-01-01T00:00:00.000Z",
    },
];
//# sourceMappingURL=ProjectBusinessRules.js.map