"use strict";

Liferay.Loader.define("@frontend-taglib-clay$clayui/drop-down@3.65.1/lib/Item", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/icon', '@frontend-taglib-clay$clayui/link', 'frontend-taglib-clay$classnames', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = void 0;

    var _icon = _interopRequireDefault(require("@frontend-taglib-clay$clayui/icon"));

    var _link = _interopRequireDefault(require("@frontend-taglib-clay$clayui/link"));

    var _classnames = _interopRequireDefault(require("frontend-taglib-clay$classnames"));

    var _react = _interopRequireDefault(require("frontend-js-react-web$react"));

    var _excluded = ["active", "children", "className", "disabled", "href", "innerRef", "onClick", "role", "spritemap", "symbolLeft", "symbolRight", "tabIndex"];

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _extends() {
      _extends = Object.assign || function (target) {
        for (var i = 1; i < arguments.length; i++) {
          var source = arguments[i];for (var key in source) {
            if (Object.prototype.hasOwnProperty.call(source, key)) {
              target[key] = source[key];
            }
          }
        }return target;
      };return _extends.apply(this, arguments);
    }

    function _objectWithoutProperties(source, excluded) {
      if (source == null) return {};var target = _objectWithoutPropertiesLoose(source, excluded);var key, i;if (Object.getOwnPropertySymbols) {
        var sourceSymbolKeys = Object.getOwnPropertySymbols(source);for (i = 0; i < sourceSymbolKeys.length; i++) {
          key = sourceSymbolKeys[i];if (excluded.indexOf(key) >= 0) continue;if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;target[key] = source[key];
        }
      }return target;
    }

    function _objectWithoutPropertiesLoose(source, excluded) {
      if (source == null) return {};var target = {};var sourceKeys = Object.keys(source);var key, i;for (i = 0; i < sourceKeys.length; i++) {
        key = sourceKeys[i];if (excluded.indexOf(key) >= 0) continue;target[key] = source[key];
      }return target;
    }

    var ClayDropDownItem = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
      var active = _ref.active,
          children = _ref.children,
          className = _ref.className,
          disabled = _ref.disabled,
          href = _ref.href,
          innerRef = _ref.innerRef,
          onClick = _ref.onClick,
          role = _ref.role,
          spritemap = _ref.spritemap,
          symbolLeft = _ref.symbolLeft,
          symbolRight = _ref.symbolRight,
          tabIndex = _ref.tabIndex,
          otherProps = _objectWithoutProperties(_ref, _excluded);

      var clickableElement = onClick ? 'button' : 'span';
      var ItemElement = href ? _link.default : clickableElement;
      return (/*#__PURE__*/_react.default.createElement("li", {
          "aria-selected": active,
          ref: ref,
          role: role
        }, /*#__PURE__*/_react.default.createElement(ItemElement, _extends({}, otherProps, {
          className: (0, _classnames.default)('dropdown-item', className, {
            active: active,
            disabled: disabled
          }),
          disabled: disabled,
          href: href,
          onClick: onClick,
          ref: innerRef,
          tabIndex: disabled ? -1 : tabIndex
        }), symbolLeft && /*#__PURE__*/_react.default.createElement("span", {
          className: "dropdown-item-indicator-start"
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          spritemap: spritemap,
          symbol: symbolLeft
        })), children, symbolRight && /*#__PURE__*/_react.default.createElement("span", {
          className: "dropdown-item-indicator-end"
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          spritemap: spritemap,
          symbol: symbolRight
        }))))
      );
    });

    ClayDropDownItem.displayName = 'ClayDropDownItem';
    var _default = ClayDropDownItem;
    exports.default = _default;
  }
});
//# sourceMappingURL=Item.js.map