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