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