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