import{_ as x}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 g}from"./BasicForm-dL_oCSPM.js";import{V as a,bk as j,d as T,c as y,o as B,l as n,w as C,j as M}from"./index-9PRMimni.js";import{u as R}from"./useForm-CKmgcynv.js";import{u as D}from"./useModal-CO65vga3.js";j();const{t:s}=a();function P(){return[{field:"adjustedContent",component:"NInput",label:s("jobPlan.viewDetails.jobDetailsTab.adjustedContent"),giProps:{span:3},componentProps:{placeholder:s("jobPlan.viewDetails.jobDetailsTab.adjustedContent"),type:"textarea",showCount:!0,maxlength:500,autosize:{minRows:3,maxRows:3}}}]}const L=T({__name:"index",emits:["submit"],setup(k,{expose:i,emit:r}){const{t:e}=a(),c=r,[l,{submit:m}]=R({schemas:P(),layout:"horizontal",gridProps:{cols:3}}),[u,{openModal:p,closeModal:d,setSubLoading:t}]=D({title:e("jobPlan.viewDetails.jobDetailsTab.submitModalTitle"),subBtuText:e("common.confirmText"),cancelText:e("common.cancelText"),width:600});async function f(){try{const o=await m();if(!o){t(!1);return}c("submit",o,b)}catch(o){console.error(o)}finally{t(!1)}}function b(){t(!1),d()}async function _(){p()}return i({handleOpenModal:_}),(o,O)=>{const h=g,w=x;return B(),y(w,{onRegister:n(u),"show-icon":"",type:"warning",onOnOk:f},{default:C(()=>[M(h,{onRegister:n(l),showActionButtonGroup:!1},null,8,["onRegister"])]),_:1},8,["onRegister"])}}});export{L as _};
