'use strict';
import { permissionActions } from '../../meta/core/resources/enums/permission-enums.js';
import { resourceIds } from '../../../fd-toolbox/constants/resource-id-constants.js';
import { permissionPackages } from '../../common/auth/permissions/permission-constants.js';
import { getBooleanEnvSetting } from '../../../fd-toolbox/infra/env-functions.js';
import { addPermissionIds, getAllPermissionActions, seedPermissionPackageToPermissionIfNotExist } from '../fd/fd-toolbox-web/permissions/fd-permission-master-data.js';
import { toolboxEnvSettingKeys } from '../../../fd-toolbox/infra/toolbox-env-setting-keys.js';

var __defProp=Object['defineProperty'],__name=(_0x239a5a,_0x1a2dc2)=>__defProp(_0x239a5a,'name',{'value':_0x1a2dc2,'configurable':!![]});async function seedDevPermissions(_0x43aee8){if(!getBooleanEnvSetting(toolboxEnvSettingKeys['seedDevResources']))return;const _0x51f949=[],_0x27d0b6=[resourceIds['friend'],resourceIds['job'],resourceIds['personToJob'],resourceIds['phoneBrand'],resourceIds['ping'],resourceIds['person'],resourceIds['personToPerson']];addPermissionIds(_0x27d0b6,getAllPermissionActions(),_0x51f949,_0x43aee8),await seedPermissionPackageToPermissionIfNotExist(permissionPackages['generalId'],_0x51f949);}__name(seedDevPermissions,'seedDevPermissions');async function seedDemoPermissions(_0x3452b1){if(!getBooleanEnvSetting(toolboxEnvSettingKeys['seedDemoResources']))return;const _0x1bf4c6=[],_0x1bcf37=[resourceIds['user'],resourceIds['contact'],resourceIds['company'],resourceIds['deal'],resourceIds['ticket'],resourceIds['feedEntry'],resourceIds['statusBoard']];addPermissionIds(_0x1bcf37,permissionActions['view'],_0x1bf4c6,_0x3452b1),await seedPermissionPackageToPermissionIfNotExist(permissionPackages['generalId'],_0x1bf4c6);}__name(seedDemoPermissions,'seedDemoPermissions');

export { seedDemoPermissions, seedDevPermissions };
