import{B as k}from"./BasicForm-dL_oCSPM.js";import{V as R,d as w,f as B,r as a,u as D,aw as S,h as V,o as C,j as c,w as I,aA as A,l as g,h8 as G}from"./index-9PRMimni.js";import{b as J}from"./meeting-Cq-av6G8.js";import{u as L}from"./useForm-CKmgcynv.js";const{t:e}=R();function U(s){return{schemas:[{field:"meeting_date",label:e("hsqe.meeting.meeting_date"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:s?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.meeting_date"),trigger:["blur"]}]},{field:"meeting_held_from",label:e("hsqe.meeting.validfrom"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:s?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.validfrom"),trigger:["blur"]}]},{field:"meeting_held_to",label:e("hsqe.meeting.validfrom"),component:"NDatePicker",giProps:{span:1},componentProps:{type:"date",valueFormat:"yyyy-MM-dd",disabled:s?.readOnly},rules:[{required:!0,type:"date",message:e("hsqe.meeting.validto"),trigger:["blur"]}]},{field:"attendee",slot:"attendee",label:e("hsqe.meeting.attendee"),giProps:{span:1},componentProps:{disabled:s?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.attendee"),trigger:["blur"]}]},{field:"meeting_place",label:e("hsqe.meeting.meeting_place"),component:"NInput",giProps:{span:1},componentProps:{type:"textarea",disabled:s?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.meeting_place"),trigger:["blur"]}]},{field:"meeting_brief",label:e("hsqe.meeting.meeting_brief"),component:"NInput",giProps:{span:1},componentProps:{type:"textarea",disabled:s?.readOnly},rules:[{required:!0,message:e("hsqe.meeting.meeting_brief"),trigger:["blur"]}]}]}}const T=w({__name:"index",setup(s,{expose:r}){const o=B(),p=a(!1),i=D(),l=a([]),d=a([]),[y,{setFieldsValue:f,getFieldsValue:_}]=L({schemas:l,labelWidth:"auto",layout:"horizontal",collapsed:!0,gridProps:{cols:2,xGap:15},showActionButtonGroup:!1}),h=a(!1);function b(t){i.success(JSON.stringify(t))}function q(t){i.success(JSON.stringify(t))}const v=async()=>{var t={template_code:o.query.meetingTypeCode,uuid:o.query.uuid},n=await J(t);f(n),console.log(n)},P=async()=>{var t=await G();d.value=t};function O(){const t=U({readOnly:h.value});l.value=t.schemas,v(),P()}S(()=>{O()});function M(){return _()}return r({getData:M}),(t,n)=>{const x=A,F=k;return C(),V("div",null,[c(F,{onRegister:g(y),ref_key:"modalRef",ref:p,"label-placement":"top",onSubmit:b,onReset:q},{attendee:I(({model:m,field:u})=>[c(x,{value:m[u],"onUpdate:value":N=>m[u]=N,filterable:"",multiple:"",options:g(d)},null,8,["value","onUpdate:value","options"])]),_:1},8,["onRegister"])])}}});export{T as _};
