'use strict';
import { workspaceNames, workspaceConstants } from '../../../fd-toolbox/server/constants/workspace-constants.js';
import { resourceNames } from '../../../fd-toolbox/resources/resource-names.js';
import { createBaseResourceProperties } from '../utils/base-resource-properties.js';
import { userConstants } from '../../../fd-toolbox/constants/user-infos.js';
import { statusBoardId } from '../../fd-app-toolbox/status-board/status-board-constants.js';
import { createResource } from '../../meta/server/resources/crud-resources.js';
import { commonLabelWords } from '../../../base-repo/constants/internal-common-strings.js';

var __defProp=Object['defineProperty'],__name=(_0x5420e0,_0x581406)=>__defProp(_0x5420e0,'name',{'value':_0x581406,'configurable':!![]});const idsToSeed={'toDo':'02251cef-4a67-4c18-b1db-f07c105315e2','paused':'f3b61cdf-a88e-442e-9bc2-0facf2c4d27a','block':'c89e60be-a53e-467e-bb55-f7e305d4562e','inProcess':'d78f9e6b-612c-4f9d-82c5-5b08f1234567','review':'e67a1bbd-a10e-442e-998c-0facf2d4e78b','close':'8636bc54-37fc-4fdb-b44e-389ece5d8059'},statusesToSeed=[{'id':idsToSeed['toDo'],'name':'To\x20Do','priority':0x1},{'id':idsToSeed['paused'],'name':'Paused','priority':0x2},{'id':idsToSeed['block'],'name':commonLabelWords['block'],'priority':0x3},{'id':idsToSeed['inProcess'],'name':'In\x20Process','priority':0x4},{'id':idsToSeed['review'],'name':'Review','priority':0x5},{'id':idsToSeed['close'],'name':'Close','priority':0x6}],itemsToSeed=[{'id':'e1a0455b-4660-4170-8203-e72b99b22c4e','statusId':idsToSeed['toDo'],'content':'Write\x20documentation\x20for\x20API','priority':0x1},{'id':'ccf9d538-c542-4671-af2c-8c40cc59dcf8','statusId':idsToSeed['toDo'],'content':'Setup\x20CI/CD\x20pipeline','priority':0x2},{'id':'b3366f43-8cd1-4d2f-8c8b-8c5f10390185','statusId':idsToSeed['paused'],'content':'Waiting\x20for\x20design\x20team\x20feedback','priority':0x1},{'id':'d4a25b7f-8d6c-43e1-87fc-a9bcf158900e','statusId':idsToSeed['block'],'content':'Dependency\x20issue\x20with\x20external\x20API','priority':0x1},{'id':'a12345cd-90ef-43bc-bdea-fad456789123','statusId':idsToSeed['block'],'content':'Blocked\x20by\x20client\x20approval','priority':0x2},{'id':'b321cf8a-7e4f-4892-9991-e87456012345','statusId':idsToSeed['inProcess'],'content':'Implement\x20authentication\x20flow','priority':0x1},{'id':'a111222b-5678-4321-91cd-abcdef123456','statusId':idsToSeed['inProcess'],'content':'Refactor\x20API\x20responses\x20for\x20better\x20performance','priority':0x2},{'id':'3e6248a0-c89d-48ea-86a5-99d39dcd3370','statusId':idsToSeed['review'],'content':'Code\x20review\x20for\x20search\x20feature','priority':0x1},{'id':'5b7ae518-94f8-46a7-af5e-585cea92955d','statusId':idsToSeed['close'],'content':'Release\x20version\x201.0','priority':0x1}];async function seedStatusBoards(){await seedStatusBoard(statusBoardId['borderId'],workspaceNames['default'],workspaceConstants['defaultWorkspaceId']);for(const _0x3a5f7c of statusesToSeed){await seedStatusBoardStatus(_0x3a5f7c['id'],_0x3a5f7c['name'],_0x3a5f7c['priority'],statusBoardId['borderId']);}for(const _0x4f3730 of itemsToSeed){await seedStatusBoardItem(_0x4f3730['id'],userConstants['timWId'],statusBoardId['borderId'],_0x4f3730['statusId'],workspaceConstants['defaultWorkspaceId'],_0x4f3730['content'],_0x4f3730['priority']);}}__name(seedStatusBoards,'seedStatusBoards');async function seedStatusBoard(_0x1e7cb4,_0x3f43a9,_0x15380a){const _0x7fa147={...createBaseResourceProperties(_0x1e7cb4),'name':_0x3f43a9,'workspaceId':_0x15380a,'userId':userConstants['timWId']};await createResource(_0x7fa147,resourceNames['statusBoard']);}__name(seedStatusBoard,'seedStatusBoard');async function seedStatusBoardStatus(_0x1301dc,_0x14be06,_0x3062e2,_0x5c338f){const _0x478691={...createBaseResourceProperties(_0x1301dc),'name':_0x14be06,'priority':_0x3062e2,'statusBoardId':_0x5c338f};await createResource(_0x478691,resourceNames['statusBoardStatus']);}__name(seedStatusBoardStatus,'seedStatusBoardStatus');async function seedStatusBoardItem(_0x2d32a9,_0x2dbbf1,_0xb14aeb,_0x57d437,_0x2514e6,_0x5d6b1d,_0x260e50){const _0x1250ee={...createBaseResourceProperties(_0x2d32a9),'userId':_0x2dbbf1,'statusBoardId':_0xb14aeb,'statusBoardStatusId':_0x57d437,'workspaceId':_0x2514e6,'content':_0x5d6b1d,'priority':_0x260e50};await createResource(_0x1250ee,resourceNames['statusBoardItem']);}__name(seedStatusBoardItem,'seedStatusBoardItem');

export { seedStatusBoards };
