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