import * as n from "react";
import e from "./index-_virtual16.js";
import { clsx as a } from "./index-clsx.js";
import { jsx as u } from "react/jsx-runtime";
function x(c) {
  const {
    className: m,
    classes: i,
    pulsate: p = !1,
    rippleX: d,
    rippleY: f,
    rippleSize: s,
    in: t,
    onExited: l,
    timeout: r
  } = c, [o, b] = n.useState(!1), h = a(m, i.ripple, i.rippleVisible, p && i.ripplePulsate), N = {
    width: s,
    height: s,
    top: -(s / 2) + f,
    left: -(s / 2) + d
  }, g = a(i.child, o && i.childLeaving, p && i.childPulsate);
  return !t && !o && b(!0), n.useEffect(() => {
    if (!t && l != null) {
      const v = setTimeout(l, r);
      return () => {
        clearTimeout(v);
      };
    }
  }, [l, t, r]), /* @__PURE__ */ u("span", {
    className: h,
    style: N,
    children: /* @__PURE__ */ u("span", {
      className: g
    })
  });
}
process.env.NODE_ENV !== "production" && (x.propTypes = {
  /**
   * Override or extend the styles applied to the component.
   */
  classes: e.object.isRequired,
  className: e.string,
  /**
   * @ignore - injected from TransitionGroup
   */
  in: e.bool,
  /**
   * @ignore - injected from TransitionGroup
   */
  onExited: e.func,
  /**
   * If `true`, the ripple pulsates, typically indicating the keyboard focus state of an element.
   */
  pulsate: e.bool,
  /**
   * Diameter of the ripple.
   */
  rippleSize: e.number,
  /**
   * Horizontal position of the ripple center.
   */
  rippleX: e.number,
  /**
   * Vertical position of the ripple center.
   */
  rippleY: e.number,
  /**
   * exit delay
   */
  timeout: e.number.isRequired
});
export {
  x as default
};
