'use strict';
import { createBaseResourceProperties } from '../../utils/base-resource-properties.js';
import { pricingIds, paymentPlanIds, paymentPlanPrices } from '../../../common/payments/payment-constants.js';
import { billingIntervals } from '../../../meta/core/resources/enums/payment-enums.js';
import { resourceNames } from '../../../../fd-toolbox/resources/resource-names.js';
import { currencyCodes } from '../../../../fd-toolbox/constants/currency-constants.js';
import { createResource } from '../../../meta/server/resources/crud-resources.js';

var __defProp=Object['defineProperty'],__name=(_0x892cb6,_0x37b11b)=>__defProp(_0x892cb6,'name',{'value':_0x37b11b,'configurable':!![]});const monthsPerYear=0x11f8+0x94f*0x4+-0x3728;async function seedPricings(){await seedMonthlyPricings(),await seedAnnualPricings();}__name(seedPricings,'seedPricings');async function seedPricing(_0x3d9296,_0x1f7c30,_0x5386ea,_0x1993e1,_0x66a5a1){const _0x1dfd1d={...createBaseResourceProperties(_0x3d9296),'paymentPlanId':_0x1f7c30,'price':_0x5386ea,'currency':_0x1993e1,'billingInterval':_0x66a5a1};return createResource(_0x1dfd1d,resourceNames['pricing']);}__name(seedPricing,'seedPricing');async function seedMonthlyPricings(){await seedPricing(pricingIds['thirdId'],paymentPlanIds['thirdId'],paymentPlanPrices['thirdPrice'],currencyCodes['usd'],billingIntervals['month']),await seedPricing(pricingIds['advancedId'],paymentPlanIds['advancedId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['month']),await seedPricing(pricingIds['basicId'],paymentPlanIds['basicId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['month']);}__name(seedMonthlyPricings,'seedMonthlyPricings');async function seedAnnualPricings(){await seedPricing(pricingIds['thirdAnnualId'],paymentPlanIds['thirdId'],paymentPlanPrices['thirdPrice']*monthsPerYear,currencyCodes['usd'],billingIntervals['year']),await seedPricing(pricingIds['advancedAnnualId'],paymentPlanIds['advancedId'],paymentPlanPrices['basicPrice'],currencyCodes['usd'],billingIntervals['year']);}__name(seedAnnualPricings,'seedAnnualPricings');

export { seedPricing, seedPricings };
