var l=(f,c,t)=>new Promise((m,r)=>{var n=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?m(e.value):Promise.resolve(e.value).then(n,i);a((t=t.apply(f,c)).next())});import{u as p}from"./useCreateDrawer-JEzOVO6Z.js";import{b6 as u}from"./bootstrap-Bqxdt4iG.js";import{u as _}from"./customers-CYPE-oGV.js";import{u as d}from"./data-refresh-BZ1_-6mk.js";import{_ as x}from"./customer-form.vue_vue_type_script_setup_true_lang-DG8_fA0v.js";import{a1 as b,ai as S,aj as w,ak as h,p as C,a9 as o}from"../jse/index-index-BUJ_4tQs.js";const $=b({__name:"customer-create-drawer",emits:["success"],setup(f,{emit:c}){const t=c,m=_(),r=d(),{Drawer:n,formRef:i,handleSubmit:a}=p({createApi:e=>l(null,null,function*(){return m.create(e)}),invalidateData:()=>r.invalidateCustomers(),title:u("page.customers.drawer.createTitle"),onSuccess:e=>{t("success",e)}});return(e,s)=>(w(),S(o(n),{class:"w-full max-w-[1000px]","confirm-text":o(u)("page.table.button.create"),"cancel-text":o(u)("page.table.button.cancel")},{default:h(()=>[C(x,{ref_key:"formRef",ref:i,mode:"create",onSubmit:o(a)},null,8,["onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{$ as _};
