import{C as c}from"./index-f6f689f9-1782572373740v=1.0.0.js";import{g,j as I}from"./eventGroupAndTermApi-31c30359-1782572373740v=1.0.0.js";import{r as n}from"./vendor-866bb149-1782572373740v=1.0.0.js";const G=(d=!1)=>{const s={eventApplyUnitType:null,unitManageConf:null,personnelIds:null,leadCreateRepresentativeNum:null,isAuth:0,minSportNum:null,maxSportNum:null,manSportNum:null,girlSportNum:null,isRepetitionEvent:0},u={eventTermId:null,eventTermList:[],eventApplyMode:null,customFieldConfUpReqVOList:[],unitForm:c(s)},f=n(c(u)),l=n(""),m=n([]),p=n([]);return{initialForm:u,unitInitialForm:s,baseInfoForm:f,eventGroupTermString:l,projectStringList:m,eventGroupTermList:p,getEventGroupTermListData:async o=>{let e=await g(o);if(e.code===0){let t=[];e.data.forEach(r=>{let i=[];r.eventTermBaseList.forEach(a=>{const v={eventTermId:a.eventTermId,eventTermName:a.name};d&&(v.eventApplyMode=a.eventApplyMode),i.push(v)});let T={eventGroupId:r.eventGroupId,eventGroupName:r.name,eventTermList:i};t.push(T)}),p.value=t}},getEventGroupTermInfoData:async o=>{var t;let e=await I(o);e.code===0&&(l.value=e.data.eventGroupName+" "+e.data.name,m.value=((t=e.data.eventProjectIdsCn)==null?void 0:t.split(","))||[])}}},h=G;export{h as u};
