import{_ as B}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 T}from"./BasicForm-dL_oCSPM.js";import{u as k}from"./useForm-CKmgcynv.js";import{V as c,d as V,r as q,c as C,o as F,l as o,w as O,j as P}from"./index-9PRMimni.js";import{u as S}from"./useModal-CO65vga3.js";const{t:r}=c();function j(){return{schemas:[{field:"comment",component:"NInput",giProps:{span:2},label:r("hsqe.planner.modal.reason"),componentProps:{type:"textarea",maxlength:300,showCount:!0},rules:[{required:!0,message:r("hsqe.planner.modal.reasonHint"),trigger:["input","blur"]}]}]}}const H=V({__name:"rejectModal",props:{type:{type:String}},emits:["success"],setup(t,{expose:l,emit:i}){const m=t,u=i,{t:s}=c(),{schemas:p}=j(),n=q(""),[f,{openModal:d,closeModal:h,setSubLoading:g}]=S({title:n,subBtuText:s("common.okText"),cancelText:s("common.cancelText"),width:650}),[_,{submit:x,getFieldsValue:b}]=k({schemas:p,labelWidth:"auto",layout:"horizontal",gridProps:{cols:2,xGap:15},showActionButtonGroup:!1});function y(e){n.value=e}async function R(){d()}async function w(){if(!await x())return g(!1),!1;const a=b();u("success",{...a,type:m.type})}return l({showModal:R,closeModal:h,setTitle:y}),(e,a)=>{const M=B;return F(),C(M,{ref:"modalRef",onRegister:o(f),onOnOk:w},{default:O(()=>[P(o(T),{onRegister:o(_),"label-placement":"top"},null,8,["onRegister"])]),_:1},8,["onRegister"])}}});export{H as _};
