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