var l=(f,n,t)=>new Promise((o,a)=>{var c=e=>{try{r(t.next(e))}catch(i){a(i)}},u=e=>{try{r(t.throw(e))}catch(i){a(i)}},r=e=>e.done?o(e.value):Promise.resolve(e.value).then(c,u);r((t=t.apply(f,n)).next())});import{u as d}from"./useCreateDrawer-JEzOVO6Z.js";import{b6 as m}from"./bootstrap-Bqxdt4iG.js";import{u as _}from"./data-refresh-BZ1_-6mk.js";import{u as v}from"./quotations-CYticOiT.js";import{_ as q}from"./quotation-detail-item-form.vue_vue_type_script_setup_true_lang-CSptaVV3.js";import{a1 as x,L as p,ai as D,aj as S,ak as w,p as I,a9 as s}from"../jse/index-index-BUJ_4tQs.js";const B=x({__name:"quotation-detail-item-create-drawer",setup(f){const n=v(),t=_(),o=p(""),a=p(""),{Drawer:c,formRef:u,handleSubmit:r}=d({createApi:e=>l(null,null,function*(){return n.createDetail(o.value,e)}),invalidateData:()=>t.invalidateQuotations(),title:m("page.quotations.itemDrawer.addTitle"),processOpenData:e=>{e!=null&&e.quotationId&&(o.value=e.quotationId),e!=null&&e.customerId&&(a.value=e.customerId)},onClosed:()=>{o.value="",a.value=""}});return(e,i)=>(S(),D(s(c),{class:"w-[520px]","confirm-text":s(m)("page.common.add"),"cancel-text":s(m)("page.common.cancel")},{default:w(()=>[I(q,{ref_key:"formRef",ref:u,mode:"create","quotation-id":o.value,"customer-id":a.value,onSubmit:s(r)},null,8,["quotation-id","customer-id","onSubmit"])]),_:1},8,["confirm-text","cancel-text"]))}});export{B as _};
