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