import{_ as k}from"./basicModal.vue_vue_type_script_setup_true_lang-CsJydKhW.js";import"./basicModal.vue_vue_type_style_index_0_lang-8QZP7ApW.js";import{B as q}from"./BasicForm-dL_oCSPM.js";import{V as c,d as B,r as t,c as w,o as T,w as F,j as P,l as r,cZ as D}from"./index-9PRMimni.js";import{u as I}from"./useModal-CO65vga3.js";import{u as N}from"./useForm-CKmgcynv.js";const{t:e}=c(),O=[{field:"planDate",component:"NDatePicker",label:e("hsqe.planner.modal.planDate"),componentProps:{valueFormat:"yyyy-MM-dd",type:"date"},rules:[{required:!0,message:e("hsqe.planner.modal.planDate"),trigger:["blur","change"]}]},{field:"name",component:"NInput",label:e("hsqe.planner.modal.reason"),componentProps:{placeholder:e("hsqe.planner.modal.reasonHint"),onInput:a=>{console.log(a)}},rules:[{required:!0,message:e("hsqe.planner.modal.reasonHint"),trigger:["blur","change"]}]}],j=B({__name:"ExtensionModal",emits:["success"],setup(a,{expose:l,emit:m}){const i=m,{t:o}=c(),p=D(),d=t(),u=t(),[f,{openModal:g,setSubLoading:n,closeModal:_}]=I({title:o("common.extensionText"),subBtuText:o("common.saveText"),cancelText:o("common.cancelText"),width:650}),[h,{submit:x}]=N({layout:"horizontal",showActionButtonGroup:!1,schemas:O,labelWidth:"auto",labelPlacement:"top",gridProps:{cols:2,xGap:45}});async function b(s){g()}async function M(){const s=await x();if(console.log("formRes:",s),!s){n(!1);return}p.success(o("common.optionsAddSuccessText")),i("success"),n(!1),_()}return l({showModal:b}),(s,S)=>{const R=q,y=k;return T(),w(y,{ref_key:"modalRef",ref:d,onRegister:r(f),class:"basicModal basicFormModal",onOnOk:M},{default:F(()=>[P(R,{ref_key:"formRef",ref:u,onRegister:r(h)},null,8,["onRegister"])]),_:1},8,["onRegister"])}}});export{j as _};
