"use strict";

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

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

    function addClass(element, className) {
      if (element.classList) element.classList.add(className);else if (!(0, _hasClass.default)(element, className)) if (typeof element.className === 'string') element.className = element.className + " " + className;else element.setAttribute('class', (element.className && element.className.baseVal || '') + " " + className);
    }

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