var u=(c,n,t)=>new Promise((r,i)=>{var o=e=>{try{a(t.next(e))}catch(l){i(l)}},s=e=>{try{a(t.throw(e))}catch(l){i(l)}},a=e=>e.done?r(e.value):Promise.resolve(e.value).then(o,s);a((t=t.apply(c,n)).next())});import{b6 as v}from"./bootstrap-Bqxdt4iG.js";import p from"./inventory-detail-list-LIAukHv9.js";import{a1 as y,L as d,V as _,ai as f,aj as m,ak as w,an as k,a9 as x}from"../jse/index-index-BUJ_4tQs.js";import{u as C}from"./use-drawer-CLDmRz16.js";const I=y({__name:"inventory-detail-list-drawer",setup(c){const n=d(""),t=d(""),r=d(),[i,o]=C({title:v("page.inventories.drawer.detailListTitle"),placement:"top",footer:!1,onOpenChange:s=>u(null,null,function*(){var a;if(s){const e=o.getData();e&&(n.value=e.inventoryId,t.value=e.inventoryName||"",o.setState({title:`${t.value} - ${v("page.inventories.drawer.detailListTitle")}`}),yield _(),(a=r.value)==null||a.query())}}),onClosed:()=>{n.value="",t.value=""}});return(s,a)=>(m(),f(x(i),{class:"h-[500px]"},{default:w(()=>[n.value?(m(),f(p,{key:0,ref_key:"listRef",ref:r,"inventory-id":n.value,embedded:""},null,8,["inventory-id"])):k("",!0)]),_:1}))}});export{I as _};
