const e=require("../classNames.js"),t=require("../props-util/index.js"),n=require("../../config-provider/hooks/useConfigInject.js"),r=require("../../vc-util/Dom/isVisible.js"),i=require("./style.js"),a=require("./useWave.js");let o=require("vue");var s=(0,o.defineComponent)({compatConfig:{MODE:3},name:`Wave`,props:{disabled:Boolean},setup(s,{slots:c}){let l=(0,o.getCurrentInstance)(),{prefixCls:u,wave:d}=n.default(`wave`,s),[,f]=i.default(u),p=a.default((0,o.computed)(()=>e.default(u.value,f.value)),d),m,h=()=>{t.findDOMNode(l).removeEventListener(`click`,m,!0)};return(0,o.onMounted)(()=>{(0,o.watch)(()=>s.disabled,()=>{h(),(0,o.nextTick)(()=>{let e=t.findDOMNode(l);e?.removeEventListener(`click`,m,!0),!(!e||e.nodeType!==1||s.disabled)&&(m=t=>{t.target.tagName===`INPUT`||!r.default(t.target)||!e.getAttribute||e.getAttribute(`disabled`)||e.disabled||e.className.includes(`disabled`)||e.className.includes(`-leave`)||p()},e.addEventListener(`click`,m,!0))})},{immediate:!0,flush:`post`})}),(0,o.onBeforeUnmount)(()=>{h()}),()=>c.default?.()[0]}});exports.default=s;