var p=(u,o,t)=>new Promise((i,r)=>{var n=e=>{try{a(t.next(e))}catch(s){r(s)}},m=e=>{try{a(t.throw(e))}catch(s){r(s)}},a=e=>e.done?i(e.value):Promise.resolve(e.value).then(n,m);a((t=t.apply(u,o)).next())});import{u as l}from"./useCreateDrawer-JEzOVO6Z.js";import{b6 as f}from"./bootstrap-Bqxdt4iG.js";import{u as _}from"./data-refresh-BZ1_-6mk.js";import{u as d}from"./tms-services-5gu256h7.js";import{_ as S}from"./service-form.vue_vue_type_script_setup_true_lang-C9SxukPd.js";import{a1 as b,ai as x,aj as v,ak as w,p as h,a9 as c}from"../jse/index-index-BUJ_4tQs.js";const $=b({__name:"service-create-drawer",emits:["success"],setup(u,{emit:o}){const t=o,i=d(),r=_(),{Drawer:n,formRef:m,handleSubmit:a}=l({createApi:e=>p(null,null,function*(){return i.create(e)}),invalidateData:()=>r.invalidateServices(),title:f("page.tms.services.drawer.createTitle"),onSuccess:e=>{t("success",e)}});return(e,s)=>(v(),x(c(n),{class:"w-[520px]","confirm-text":c(f)("page.table.button.create"),"cancel-text":c(f)("page.table.button.cancel")},{default:w(()=>[h(S,{ref_key:"formRef",ref:m,mode:"create",onSubmit:c(a)},null,8,["onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{$ as _};
