text: "use strict";
  var __assign = (this && this.__assign) || function () {
      __assign = Object.assign || function(t) {
          for (var s, i = 1, n = arguments.length; i < n; i++) {
              s = arguments[i];
              for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                  t[p] = s[p];
          }
          return t;
      };
      return __assign.apply(this, arguments);
  };
  var __rest = (this && this.__rest) || function (s, e) {
      var t = {};
      for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
          t[p] = s[p];
      if (s != null && typeof Object.getOwnPropertySymbols === "function")
          for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
              if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                  t[p[i]] = s[p[i]];
          }
      return t;
  };
  var __importDefault = (this && this.__importDefault) || function (mod) {
      return (mod && mod.__esModule) ? mod : { "default": mod };
  };
  Object.defineProperty(exports, "__esModule", { value: true });
  var react_1 = __importDefault(require("react"));
  var reducer_1 = require("./reducer");
  var RippleContainer_1 = __importDefault(require("./RippleContainer"));
  var useRippleHandlers_1 = __importDefault(require("./useRippleHandlers"));
  /**
   * A hook that will return an object containing the ripples element
   * and an object of event handlers to apply to an element to trigger
   * the ripple effects.
   */
  function useRipples(_a) {
      var rippleTimeout = _a.rippleTimeout, rippleClassNames = _a.rippleClassNames, rippleContainerClassName = _a.rippleContainerClassName, rippleClassName = _a.rippleClassName, disableRipple = _a.disableRipple, disableSpacebarClick = _a.disableSpacebarClick, options = __rest(_a, ["rippleTimeout", "rippleClassNames", "rippleContainerClassName", "rippleClassName", "disableRipple", "disableSpacebarClick"]);
      var _b = reducer_1.useRippleTransition(disableSpacebarClick), create = _b.create, state = _b.state, release = _b.release, entered = _b.entered, remove = _b.remove, cancel = _b.cancel;
      var handlers = useRippleHandlers_1.default(__assign({ create: create,
          release: release,
          cancel: cancel,
          disableRipple: disableRipple }, options));
      return {
          handlers: handlers,
          ripples: disableRipple ? null : (react_1.default.createElement(RippleContainer_1.default, { key: "ripples", ripples: state, className: rippleContainerClassName, rippleClassName: rippleClassName, timeout: rippleTimeout, classNames: rippleClassNames, entered: entered, exited: remove })),
      };
  }
  exports.default = useRipples;
  //# sourceMappingURL=useRipples.js.map