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