var p=(f,c,t)=>new Promise((n,r)=>{var m=e=>{try{a(t.next(e))}catch(s){r(s)}},i=e=>{try{a(t.throw(e))}catch(s){r(s)}},a=e=>e.done?n(e.value):Promise.resolve(e.value).then(m,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"./warehouses-BnkLPhlE.js";import{_ as h}from"./warehouse-form.vue_vue_type_script_setup_true_lang-DgAS3L5u.js";import{a1 as w,ai as b,aj as x,ak as S,p as k,a9 as o}from"../jse/index-index-BUJ_4tQs.js";const W=w({__name:"warehouse-create-drawer",emits:["success"],setup(f,{emit:c}){const t=c,n=d(),r=_(),{Drawer:m,formRef:i,handleSubmit:a}=l({createApi:e=>p(null,null,function*(){return n.create(e)}),invalidateData:()=>r.invalidateWarehouses(),title:u("page.warehouses.drawer.createTitle"),onSuccess:e=>{t("success",e)}});return(e,s)=>(x(),b(o(m),{class:"w-[520px]","confirm-text":o(u)("page.table.button.create"),"cancel-text":o(u)("page.table.button.cancel")},{default:S(()=>[k(h,{ref_key:"formRef",ref:i,mode:"create",onSubmit:o(a)},null,8,["onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{W as _};
