import{defineComponent as s,shallowRef as t,watch as c,createVNode as l}from"vue";import b from"./Mask.mjs";import v from"./MobilePopupInner.mjs";import d from"./PopupInner.mjs";import{popupProps as P}from"./interface.mjs";const R=s({compatConfig:{MODE:3},name:"Popup",inheritAttrs:!1,props:P,setup(e,{attrs:f,slots:n,expose:a}){const r=t(!1),u=t(!1),o=t(),m=t();return c([()=>e.visible,()=>e.mobile],()=>{r.value=e.visible,e.visible&&e.mobile&&(u.value=!0)},{immediate:!0,flush:"post"}),a({forceAlign:()=>{o.value?.forceAlign()},getElement:()=>o.value?.getElement()}),()=>{const i={...e,...f,visible:r.value},p=u.value?l(v,{...i,mobile:e.mobile,ref:o},{default:n.default}):l(d,{...i,ref:o},{default:n.default});return l("div",{ref:m},[l(b,i,null),p])}}});export{R as default};
