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