var l=(f,o,t)=>new Promise((c,r)=>{var n=a=>{try{e(t.next(a))}catch(m){r(m)}},i=a=>{try{e(t.throw(a))}catch(m){r(m)}},e=a=>a.done?c(a.value):Promise.resolve(a.value).then(n,i);e((t=t.apply(f,o)).next())});import{b7 as p,b6 as u}from"./bootstrap-Bqxdt4iG.js";import{u as _}from"./useCreateDrawer-JEzOVO6Z.js";import{u as d}from"./data-refresh-BZ1_-6mk.js";import{u as S}from"./storage-leases-DxTjNUp2.js";import{_ as b}from"./storage-lease-form.vue_vue_type_script_setup_true_lang-B-mZKIdm.js";import{a1 as g,ai as x,aj as h,ak as w,p as R,a9 as s}from"../jse/index-index-BUJ_4tQs.js";const B=g({__name:"storage-lease-create-drawer",setup(f){const o=p(),t=S(),c=d(),{Drawer:r,formRef:n,handleSubmit:i}=_({createApi:e=>l(null,null,function*(){return t.create(e)}),invalidateData:()=>c.invalidateStorageLeases(),title:u("page.storageLeases.drawer.createTitle"),onSuccess:e=>{o.push(`/warehouse/storage-leases/detail/${e.id}`)}});return(e,a)=>(h(),x(s(r),{class:"w-[640px]","confirm-text":s(u)("page.table.button.create"),"cancel-text":s(u)("page.table.button.cancel")},{default:w(()=>[R(b,{ref_key:"formRef",ref:n,mode:"create",onSubmit:s(i)},null,8,["onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{B as _};
