"use strict";

Liferay.Loader.define("site-navigation-item-selector-web$dom-helpers@5.2.0/cjs/toggleClass", ['module', 'exports', 'require', '@site-navigation-item-selector-web$babel/runtime/helpers/interopRequireDefault', './addClass', './hasClass', './removeClass'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    var _interopRequireDefault = require("@site-navigation-item-selector-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