'use strict';
import { createBaseResourceProperties } from '../../utils/base-resource-properties.js';
import { updateContact, createContact } from './contact-db.js';
import { workspaceConstants } from '../../../../fd-toolbox/server/constants/workspace-constants.js';
import { contactLeadStatuses, contactLifeCycleStages } from '../../../common/demo/demo-resources-enums.js';
import { userIds } from '../../../common/dev/constants/user-ids.js';
import { publicImages } from '../../../../fd-toolbox/constants/public-files.js';
import { fileExtensions } from '../../../../base-repo/app-constants/internal-system-constants.js';
import { companyIds } from '../companies/company-master-data.js';
import { demoContactSeedValues, demoPersonNames } from '../demo-seed-constants.js';

var __defProp=Object['defineProperty'],__name=(_0x1c4bf0,_0x5b6b05)=>__defProp(_0x1c4bf0,'name',{'value':_0x5b6b05,'configurable':!![]});const contactIds={'emilyBrownId':'159e4c7a-ff5f-4162-8237-acec3ca8a759','alexJohnsonId':'754c77d8-eefb-4a90-b07b-ed00980c88b4','bobWilliamsId':'ecb1a0f4-d244-4136-badf-c2bc72e3b678','carolTaylorId':'ec0e0285-22d9-48d4-b4b3-96388c37c807','mikeJonesId':'b2f746d1-6b3c-4c47-8e07-f73927c167cb','dianeWhiteId':'b515cb46-eab4-4862-9e8e-c2f5f217ae79','bobKellerId':'65e07208-6b1f-4a59-b5e3-2f80f5741b18','susanAdamsonId':'9fd23cd9-9b94-4bb8-bb73-d315b93b8a5c','jamesMoriartyId':'cf2eae72-e5ab-4d95-8f08-b6571b44f8eb','lauraJonesId':'6d1c5410-ef5b-4d37-8b8d-4ab8cfc87785'};async function seedContacts(){let _0x4f2470,_0x3a1587;for(const _0x18b4e6 of contactsToSeed){const _0xe1e246=await seedContact(_0x18b4e6['id'],_0x18b4e6['firstName'],_0x18b4e6['lastName'],_0x18b4e6['email'],_0x18b4e6['phoneNumber'],_0x18b4e6['contactOwnerUserId'],_0x18b4e6['lifeCycleStage'],_0x18b4e6['leadStatus'],_0x18b4e6['city'],_0x18b4e6['recordSource'],_0x18b4e6['parentContactId'],_0x18b4e6['companyId']);_0x18b4e6['id']===contactIds['bobWilliamsId']&&(_0x4f2470=_0xe1e246),_0x18b4e6['id']===contactIds['lauraJonesId']&&(_0x3a1587=_0xe1e246);}_0x4f2470&&_0x3a1587&&(_0x4f2470['parentContactId']=_0x3a1587['id'],await updateContact(_0x4f2470));}__name(seedContacts,'seedContacts');async function seedContact(_0xe5f98,_0x240ee1,_0x215d67,_0x1838f3,_0x1c07e8,_0x1d05d8,_0x5b3d92,_0x533d8f,_0x3c4738,_0x403f1d,_0xfd83eb,_0x5a7972){const _0xdd6975='/'+publicImages['contact']+'/'+_0xe5f98+fileExtensions['webp'],_0x4f598a={...createBaseResourceProperties(_0xe5f98),'firstName':_0x240ee1,'lastName':_0x215d67,'email':_0x1838f3,'phoneNumber':_0x1c07e8,'contactOwnerUserId':_0x1d05d8,'lifeCycleStage':_0x5b3d92,'leadStatus':_0x533d8f,'city':_0x3c4738,'recordSource':_0x403f1d,'parentContactId':_0xfd83eb,'companyId':_0x5a7972,'workspaceId':workspaceConstants['defaultWorkspaceId'],'imageUrl':_0xdd6975};return createContact(_0x4f598a);}__name(seedContact,'seedContact');const contactsToSeed=[{'id':contactIds['bobWilliamsId'],'firstName':demoContactSeedValues['bob'],'lastName':'Williams','email':'bob.williams@example.com','phoneNumber':demoContactSeedValues['phone5555556666'],'contactOwnerUserId':userIds['colinBId'],'lifeCycleStage':contactLifeCycleStages['other'],'leadStatus':contactLeadStatuses['new'],'city':demoContactSeedValues['capitolCity'],'recordSource':demoContactSeedValues['emailSource'],'companyId':companyIds['innovateLabId']},{'id':contactIds['emilyBrownId'],'firstName':'Emily','lastName':demoPersonNames['brown'],'email':'emily.brown@example.com','phoneNumber':'5551212122','contactOwnerUserId':userIds['timWId'],'lifeCycleStage':contactLifeCycleStages['lead'],'leadStatus':contactLeadStatuses['open'],'city':demoContactSeedValues['springfield'],'recordSource':'CRM','parentContactId':contactIds['bobWilliamsId'],'companyId':companyIds['brandSparkId']},{'id':contactIds['alexJohnsonId'],'firstName':'Alex','lastName':'Johnson','email':'alex.johnson@example.com','phoneNumber':'5552223333','contactOwnerUserId':userIds['prestonAId'],'lifeCycleStage':contactLifeCycleStages['lead'],'leadStatus':contactLeadStatuses['inProcess'],'city':'Rivertown','recordSource':demoContactSeedValues['referralSource'],'parentContactId':contactIds['emilyBrownId'],'companyId':companyIds['artisanId']},{'id':contactIds['carolTaylorId'],'firstName':'Carol','lastName':demoPersonNames['taylor'],'email':'carol.taylor@example.com','phoneNumber':demoContactSeedValues['phone5557778888'],'contactOwnerUserId':userIds['victorWId'],'lifeCycleStage':contactLifeCycleStages['subscriber'],'leadStatus':contactLeadStatuses['inProcess'],'city':'Ogdenville','recordSource':demoContactSeedValues['referralSource'],'parentContactId':contactIds['bobWilliamsId'],'companyId':companyIds['brownieCorp']},{'id':contactIds['mikeJonesId'],'firstName':'Mike','lastName':demoContactSeedValues['jones'],'email':'mike.jones@example.com','phoneNumber':demoContactSeedValues['phone5559990000'],'contactOwnerUserId':userIds['timWId'],'lifeCycleStage':contactLifeCycleStages['lead'],'leadStatus':contactLeadStatuses['badTiming'],'city':demoContactSeedValues['northHaverbrook'],'recordSource':'Social\x20Media','companyId':companyIds['fastTrackId']},{'id':contactIds['dianeWhiteId'],'firstName':'Diane','lastName':'White','email':'diane.white@example.com','phoneNumber':'5551112222','contactOwnerUserId':userIds['prestonAId'],'lifeCycleStage':contactLifeCycleStages['customer'],'leadStatus':contactLeadStatuses['open'],'city':demoContactSeedValues['springfield'],'recordSource':demoContactSeedValues['webSource'],'parentContactId':contactIds['mikeJonesId'],'companyId':companyIds['catalystId']},{'id':contactIds['bobKellerId'],'firstName':demoContactSeedValues['bob'],'lastName':'Keller','email':'bob.keller@example.com','phoneNumber':'5553334444','contactOwnerUserId':userIds['colinBId'],'lifeCycleStage':contactLifeCycleStages['other'],'leadStatus':contactLeadStatuses['unqualified'],'city':demoContactSeedValues['capitolCity'],'recordSource':demoContactSeedValues['emailSource'],'parentContactId':contactIds['dianeWhiteId'],'companyId':companyIds['quantumId']},{'id':contactIds['susanAdamsonId'],'firstName':'Susan','lastName':'Adamson','email':'susan.adamson@example.com','phoneNumber':demoContactSeedValues['phone5555556666'],'contactOwnerUserId':userIds['victorWId'],'lifeCycleStage':contactLifeCycleStages['opportunity'],'leadStatus':contactLeadStatuses['unassigned'],'city':demoContactSeedValues['shelbyville'],'recordSource':demoContactSeedValues['webSource'],'parentContactId':contactIds['bobKellerId'],'companyId':companyIds['solarFlowId']},{'id':contactIds['jamesMoriartyId'],'firstName':'James','lastName':'Moriarty','email':'james.moriarty@example.com','phoneNumber':demoContactSeedValues['phone5557778888'],'contactOwnerUserId':userIds['timWId'],'lifeCycleStage':contactLifeCycleStages['lead'],'leadStatus':contactLeadStatuses['openDeal'],'city':demoContactSeedValues['northHaverbrook'],'recordSource':demoContactSeedValues['referralSource'],'parentContactId':contactIds['susanAdamsonId'],'companyId':companyIds['nexusTechId']},{'id':contactIds['lauraJonesId'],'firstName':'Laura','lastName':demoContactSeedValues['jones'],'email':'laura.jones@example.com','phoneNumber':demoContactSeedValues['phone5559990000'],'contactOwnerUserId':userIds['prestonAId'],'lifeCycleStage':contactLifeCycleStages['customer'],'leadStatus':contactLeadStatuses['connected'],'city':demoContactSeedValues['shelbyville'],'recordSource':demoContactSeedValues['webSource'],'parentContactId':contactIds['jamesMoriartyId'],'companyId':companyIds['brandSparkId']}];

export { contactIds, seedContacts };
