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