import{defineComponent as w,ref as g,createVNode as t}from"vue";import N from"../../_util/PortalWrapper.mjs";import y from"../../_util/props-util/initDefaultProps.mjs";import p from"./DrawerChild.mjs";import{drawerProps as D}from"./IDrawerPropTypes.mjs";const v=w({compatConfig:{MODE:3},inheritAttrs:!1,props:y(D(),{prefixCls:"drawer",placement:"left",getContainer:"body",level:"all",duration:".3s",ease:"cubic-bezier(0.78, 0.14, 0.15, 0.86)",afterVisibleChange:()=>{},showMask:!0,maskClosable:!0,maskStyle:{},wrapperClassName:"",keyboard:!0,forceRender:!1,autofocus:!0}),emits:["handleClick","close"],setup(e,{emit:a,slots:o}){const n=g(null),l=r=>{a("handleClick",r)},i=r=>{a("close",r)};return()=>{const{getContainer:r,wrapperClassName:h,rootClassName:s,rootStyle:f,forceRender:k,...d}=e;let c=null;if(!r)return t(p,{...d,rootClassName:s,rootStyle:f,open:e.open,onClose:i,onHandleClick:l,inline:!0},o);const C=!!o.handler||k;return(C||e.open||n.value)&&(c=t(N,{autoLock:!0,visible:e.open,forceRender:C,getContainer:r,wrapperClassName:h},{default:({visible:u,afterClose:m,...b})=>t(p,{ref:n,...d,...b,rootClassName:s,rootStyle:f,open:u!==void 0?u:e.open,afterVisibleChange:m!==void 0?m:e.afterVisibleChange,onClose:i,onHandleClick:l},o)})),c}}});export{v as default};
