import{ar as w,bn as P,as as y,a as p,c as h,bo as x,y as Q,bp as C,at as j,T as k,am as M}from"./index-OSKNspXo.js";const A=w({name:"QPopupProxy",props:{...P,breakpoint:{type:[String,Number],default:450}},emits:["show","hide"],setup(o,{slots:g,emit:c,attrs:v}){const{proxy:s}=y(),{$q:l}=s,n=p(!1),t=p(null),i=h(()=>parseInt(o.breakpoint,10)),{canShow:f}=x({showing:n});function u(){return l.screen.width<i.value||l.screen.height<i.value?"dialog":"menu"}const a=p(u()),d=h(()=>a.value==="menu"?{maxHeight:"99vh"}:{});Q(()=>u(),e=>{n.value!==!0&&(a.value=e)});function m(e){n.value=!0,c("show",e)}function b(e){n.value=!1,a.value=u(),c("hide",e)}return Object.assign(s,{show(e){f(e)===!0&&t.value.show(e)},hide(e){t.value.hide(e)},toggle(e){t.value.toggle(e)}}),C(s,"currentComponent",()=>({type:a.value,ref:t.value})),()=>{const e={ref:t,...d.value,...v,onShow:m,onHide:b};let r;return a.value==="dialog"?r=k:(r=M,Object.assign(e,{target:o.target,contextMenu:o.contextMenu,noParentEvent:!0,separateClosePopup:!0})),j(r,e,g.default)}}});export{A as Q};
//# sourceMappingURL=QPopupProxy-D6KhZL6Z.js.map
