var m=(u,n,t)=>new Promise((r,a)=>{var i=e=>{try{o(t.next(e))}catch(s){a(s)}},l=e=>{try{o(t.throw(e))}catch(s){a(s)}},o=e=>e.done?r(e.value):Promise.resolve(e.value).then(i,l);o((t=t.apply(u,n)).next())});import{u as _}from"./useCreateDrawer-JEzOVO6Z.js";import{b6 as f}from"./bootstrap-Bqxdt4iG.js";import{u as g}from"./data-refresh-BZ1_-6mk.js";import{u as d}from"./storage-leases-DxTjNUp2.js";import{_ as S}from"./storage-lease-period-form.vue_vue_type_script_setup_true_lang-DEIUyA6F.js";import{a1 as b,L as p,ai as v,aj as x,ak as L,p as D,a9 as c}from"../jse/index-index-BUJ_4tQs.js";const y=b({__name:"storage-lease-period-create-drawer",setup(u){const n=d(),t=g(),r=p(""),a=p(""),{Drawer:i,formRef:l,handleSubmit:o}=_({createApi:e=>m(null,null,function*(){return n.createDetail(r.value,e)}),invalidateData:()=>t.invalidateStorageLeases(),title:f("page.storageLeases.periodDrawer.createTitle"),processOpenData:e=>{e!=null&&e.storageLeaseId&&(r.value=e.storageLeaseId),e!=null&&e.defaultAction&&(a.value=e.defaultAction)},onClosed:()=>{r.value="",a.value=""}});return(e,s)=>(x(),v(c(i),{class:"w-[520px]","confirm-text":c(f)("page.table.button.create"),"cancel-text":c(f)("page.table.button.cancel")},{default:L(()=>[D(S,{ref_key:"formRef",ref:l,mode:"create","default-action":a.value,onSubmit:c(o)},null,8,["default-action","onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{y as _};
