const e=require("../_util/classNames.js"),t=require("../config-provider/hooks/useConfigInject.js"),n=require("../vc-notification/useNotification.js"),r=require("./style/index.js"),i=require("./PurePanel.js"),a=require("./util.js");let o=require("vue");var s=24,c=4.5,l=(0,o.defineComponent)({name:`Holder`,inheritAttrs:!1,props:[`prefixCls`,`class`,`type`,`icon`,`content`,`onAllRemoved`],setup(l,{expose:u}){let{getPrefixCls:d,getPopupContainer:f}=t.default(`notification`,l),p=(0,o.computed)(()=>l.prefixCls||d(`notification`)),m=e=>a.getPlacementStyle(e,l.top??s,l.bottom??s),[,h]=r.default(p),[g,_]=n.default({prefixCls:p.value,getStyles:m,getClassName:()=>e.default(h.value,{[`${p.value}-rtl`]:l.rtl}),motion:()=>a.getMotion(p.value),closable:!0,closeIcon:i.getCloseIcon(p.value),duration:c,getContainer:()=>l.getPopupContainer?.()||f.value?.()||document.body,maxCount:l.maxCount,hashId:h.value,onAllRemoved:l.onAllRemoved});return u({...g,prefixCls:p.value,hashId:h}),_}});function u(t){let n=(0,o.shallowRef)(null),r=Symbol(`notificationHolderKey`),a=t=>{if(!n.value)return;let{open:r,prefixCls:a,hashId:s}=n.value,c=`${a}-notice`,{message:l,description:u,icon:d,type:f,btn:p,class:m,...h}=t;return r({placement:`topRight`,...h,content:()=>(0,o.createVNode)(i.PureContent,{prefixCls:c,icon:typeof d==`function`?d():d,type:f,message:typeof l==`function`?l():l,description:typeof u==`function`?u():u,btn:typeof p==`function`?p():p},null),class:e.default(f&&`${c}-${f}`,s,m)})},s={open:a,destroy:e=>{e===void 0?n.value?.destroy():n.value?.close(e)}};return[`success`,`info`,`warning`,`error`].forEach(e=>{s[e]=t=>a({...t,type:e})}),[s,()=>(0,o.createVNode)(l,{key:r,...t,ref:n},null)]}function d(e){return u(e)}exports.default=d,exports.useInternalNotification=u;