'use strict';
import { getNewUuid } from '../../../fd-toolbox/uuids.js';
import { createBaseResourceProperties } from '../utils/base-resource-properties.js';
import { featureIds } from '../../meta/core/resources/features/feature-ids.js';
import { featureCodes } from '../../meta/core/resources/features/feature-codes.js';
import { getFeatures, createFeatureResource } from './feature-db.js';
import { getAllFeatureCodes } from './feature-mother.js';
import { featureStates } from '../../meta/core/resources/enums/feature-enums.js';

var __defProp=Object['defineProperty'],__name=(_0x5d7912,_0x31a916)=>__defProp(_0x5d7912,'name',{'value':_0x31a916,'configurable':!![]});async function seedBasicPlanFeatures(){await seedFeature(featureIds['userSupportId'],featureCodes['userSupport'],featureCodes['userSupport'],-0xbaa+-0x3*0x6cf+0x2018,!![],[],[]),await seedFeature(featureIds['contactManagementId'],featureCodes['contactManagement'],featureCodes['contactManagement'],0x3cb*0x1+-0x2*0x1277+0x2124,!![],[],[]),await seedFeature(featureIds['tasksAndRemindersId'],featureCodes['tasksAndReminders'],featureCodes['tasksAndReminders'],-0xc50+0x3f5*-0x1+0x1046,!![],[],[]),await seedFeature(featureIds['calendarAndSchedulingId'],featureCodes['calendarAndScheduling'],featureCodes['calendarAndScheduling'],0xaf1+0xa26+-0xa8b*0x2,!![],[],[]),await seedFeature(featureIds['analyticsAndReportingId'],featureCodes['analyticsAndReporting'],featureCodes['analyticsAndReporting'],-0x955*-0x2+0x26e4*-0x1+0x143b,!![],[],[]);}__name(seedBasicPlanFeatures,'seedBasicPlanFeatures');async function seedPremiumPlanFeatures(){await seedFeature(featureIds['advancedAutomationId'],featureCodes['advancedAutomation'],featureCodes['advancedAutomation'],-0x10fb+-0xbe3*-0x2+-0x16*0x4f,![],[],[]),await seedFeature(featureIds['teamCollaborationToolsId'],featureCodes['teamCollaborationTools'],featureCodes['teamCollaborationTools'],-0x1dc7+0xe0e+0xfba,![],[],[]),await seedFeature(featureIds['priorityCustomerSupportId'],featureCodes['priorityCustomerSupport'],featureCodes['priorityCustomerSupport'],-0x23b7+-0x17bf*0x1+0x3b77,![],[],[]),await seedFeature(featureIds['advancedSecurityFeaturesId'],featureCodes['advancedSecurityFeatures'],featureCodes['advancedSecurityFeatures'],-0x1*-0x1d9e+0x11*-0x14b+-0x7a2,![],[],[]),await seedFeature(featureIds['apiAccessAndCustomDevelopmentId'],featureCodes['apiAccessCustomDevelopment'],featureCodes['apiAccessCustomDevelopment'],0x1214+0x2*0x476+0x1aff*-0x1,![],[],[]),await seedFeature(featureIds['customizableDashboardsAndReportsId'],featureCodes['customizableDashboardsAndReports'],featureCodes['customizableDashboardsAndReports'],-0x21e1+0x32+0x21b0,![],[],[]);}__name(seedPremiumPlanFeatures,'seedPremiumPlanFeatures');async function seedEnterprisePlanFeatures(){await seedFeature(featureIds['unlimitedUsersId'],featureCodes['unlimitedUsers'],featureCodes['unlimitedUsers'],0x1df3+0x1a6f+-0x3861,![],[],[]),await seedFeature(featureIds['fullCustomizationId'],featureCodes['fullCustomization'],featureCodes['fullCustomization'],0x1*-0x449+0x1c3d*0x1+-0x17f3,![],[],[]),await seedFeature(featureIds['scalableAutomationId'],featureCodes['scalableAutomation'],featureCodes['scalableAutomation'],0x18be+-0x107f+0x1*-0x83e,![],[],[]),await seedFeature(featureIds['backupAndRecoveryId'],featureCodes['backupAndRecovery'],featureCodes['backupAndRecovery'],-0x1*0x1869+-0x13b+0x19a5,![],[],[]),await seedFeature(featureIds['advancedAnalyticsAndReportingId'],featureCodes['advancedAnalyticsAndReporting'],featureCodes['advancedAnalyticsAndReporting'],0x2*0x5ce+0x11b0+-0x1d4b,![],[],[]);}__name(seedEnterprisePlanFeatures,'seedEnterprisePlanFeatures');async function seedFeatures(){const _0x18e090=await getFeatures(),_0xeec81e=new Set(_0x18e090['map'](_0x23e481=>_0x23e481['code'])),_0xafa354=new Map();for(const _0x1d1a9c of _0x18e090){_0xafa354['set'](_0x1d1a9c['code'],_0x1d1a9c);}for(const _0x2fd6a2 of getAllFeatureCodes()){if(!_0xeec81e['has'](_0x2fd6a2)){const _0x2c7ba6=await seedFeature(getNewUuid(),_0x2fd6a2,_0x2fd6a2,featureStates['enabled'],!![],[],[]);_0xafa354['set'](_0x2fd6a2,_0x2c7ba6);}}return _0xafa354;}__name(seedFeatures,'seedFeatures');function seedFeature(_0x31be29,_0x2c4981,_0x17dda5,_0x2cd637,_0x1f8c42,_0x4b4971,_0x5db5ea){const _0x5c214b={...createBaseResourceProperties(_0x31be29),'name':_0x2c4981,'code':_0x17dda5,'state':_0x2cd637,'enabledByDefaultForUsers':_0x1f8c42,'userFeatureList':_0x4b4971,'roleFeatureList':_0x5db5ea};return createFeatureResource(_0x5c214b);}__name(seedFeature,'seedFeature');

export { seedBasicPlanFeatures, seedEnterprisePlanFeatures, seedFeatures, seedPremiumPlanFeatures };
