const e=require("../_util/props-util/initDefaultProps.js"),t=require("../vc-trigger/context.js"),n=require("../_util/PortalWrapper.js"),r=require("./IDialogPropTypes.js"),i=require("./Dialog.js");let a=require("vue");var o=(0,a.defineComponent)({compatConfig:{MODE:3},name:`DialogWrap`,inheritAttrs:!1,props:e.default(r.default(),{visible:!1}),setup(e,{attrs:r,slots:o}){let s=(0,a.ref)(e.visible);return t.useProvidePortal({},{inTriggerContext:!1}),(0,a.watch)(()=>e.visible,()=>{e.visible&&(s.value=!0)},{flush:`post`}),()=>{let{visible:t,getContainer:c,forceRender:l,destroyOnClose:u=!1,afterClose:d}=e,f={...e,...r,ref:`_component`,key:`dialog`};return c===!1?(0,a.createVNode)(i.default,{...f,getOpenCount:()=>2},o):!l&&u&&!s.value?null:(0,a.createVNode)(n.default,{autoLock:!0,visible:t,forceRender:l,getContainer:c},{default:e=>(f={...f,...e,afterClose:()=>{d?.(),s.value=!1}},(0,a.createVNode)(i.default,f,o))})}}});exports.default=o;