"use strict";

Liferay.Loader.define("frontend-js-components-web$dom-helpers@5.2.0/cjs/toggleClass", ['module', 'exports', 'require', '@frontend-js-components-web$babel/runtime/helpers/interopRequireDefault', './addClass', './hasClass', './removeClass'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    var _interopRequireDefault = require("@frontend-js-components-web$babel/runtime/helpers/interopRequireDefault");

    exports.__esModule = true;
    exports.default = toggleClass;

    var _addClass = _interopRequireDefault(require("./addClass"));

    var _hasClass = _interopRequireDefault(require("./hasClass"));

    var _removeClass = _interopRequireDefault(require("./removeClass"));

    function toggleClass(element, className) {
      if (element.classList) element.classList.toggle(className);else if ((0, _hasClass.default)(element, className)) (0, _removeClass.default)(element, className);else (0, _addClass.default)(element, className);
    }

    module.exports = exports["default"];
  }
});
//# sourceMappingURL=toggleClass.js.map