"use strict";

Liferay.Loader.define("@frontend-taglib-clay$clayui/form@3.58.0/lib/Input", ['module', 'exports', 'require', '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 _classnames = _interopRequireDefault(require("frontend-taglib-clay$classnames"));

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

    var _excluded = ["append", "children", "className", "prepend", "shrink"],
        _excluded2 = ["children", "className", "small", "stacked"],
        _excluded3 = ["children", "className"],
        _excluded4 = ["after", "before", "children", "className", "tag"],
        _excluded5 = ["className", "component", "insetAfter", "insetBefore", "sizing", "type"];

    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 _defineProperty(obj, key, value) {
      if (key in obj) {
        Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true });
      } else {
        obj[key] = value;
      }return obj;
    }

    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 ClayInputGroupItem = /*#__PURE__*/_react.default.forwardRef(function (_ref, ref) {
      var _classNames;

      var append = _ref.append,
          children = _ref.children,
          className = _ref.className,
          prepend = _ref.prepend,
          shrink = _ref.shrink,
          otherProps = _objectWithoutProperties(_ref, _excluded);

      return (/*#__PURE__*/_react.default.createElement("div", _extends({}, otherProps, {
          className: (0, _classnames.default)('input-group-item', className, (_classNames = {}, _defineProperty(_classNames, 'input-group-append', append), _defineProperty(_classNames, 'input-group-item-shrink', shrink), _defineProperty(_classNames, 'input-group-prepend', prepend), _classNames)),
          ref: ref
        }), children)
      );
    });

    ClayInputGroupItem.displayName = 'ClayInputGroupItem';

    var ClayInputGroup = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
      var _classNames2;

      var children = _ref2.children,
          className = _ref2.className,
          small = _ref2.small,
          stacked = _ref2.stacked,
          otherProps = _objectWithoutProperties(_ref2, _excluded2);

      return (/*#__PURE__*/_react.default.createElement("div", _extends({}, otherProps, {
          className: (0, _classnames.default)('input-group', className, (_classNames2 = {}, _defineProperty(_classNames2, 'input-group-sm', small), _defineProperty(_classNames2, 'input-group-stacked-sm-down', stacked), _classNames2)),
          ref: ref
        }), children)
      );
    });

    ClayInputGroup.displayName = 'ClayInputGroup';

    var ClayInputGroupText = /*#__PURE__*/_react.default.forwardRef(function (_ref3, ref) {
      var children = _ref3.children,
          className = _ref3.className,
          otherProps = _objectWithoutProperties(_ref3, _excluded3);

      return (/*#__PURE__*/_react.default.createElement("div", _extends({}, otherProps, {
          className: (0, _classnames.default)('input-group-text', className),
          ref: ref
        }), children)
      );
    });

    ClayInputGroupText.displayName = 'ClayInputGroupText';

    var ClayInputGroupInsetItem = /*#__PURE__*/_react.default.forwardRef(function (_ref4, ref) {
      var _classNames3;

      var after = _ref4.after,
          before = _ref4.before,
          children = _ref4.children,
          className = _ref4.className,
          _ref4$tag = _ref4.tag,
          Tag = _ref4$tag === void 0 ? 'div' : _ref4$tag,
          otherProps = _objectWithoutProperties(_ref4, _excluded4);

      return (/*#__PURE__*/_react.default.createElement(Tag, _extends({}, otherProps, {
          className: (0, _classnames.default)('input-group-inset-item', className, (_classNames3 = {}, _defineProperty(_classNames3, 'input-group-inset-item-after', after), _defineProperty(_classNames3, 'input-group-inset-item-before', before), _classNames3)),
          ref: ref // Hack to get around TS inaccurately referring the ref type

        }), children)
      );
    });

    ClayInputGroupInsetItem.displayName = 'ClayInputGroupInsetItem';

    var ClayInput = /*#__PURE__*/_react.default.forwardRef(function (_ref5, ref) {
      var _classNames4;

      var className = _ref5.className,
          _ref5$component = _ref5.component,
          Component = _ref5$component === void 0 ? 'input' : _ref5$component,
          insetAfter = _ref5.insetAfter,
          insetBefore = _ref5.insetBefore,
          sizing = _ref5.sizing,
          _ref5$type = _ref5.type,
          type = _ref5$type === void 0 ? 'text' : _ref5$type,
          otherProps = _objectWithoutProperties(_ref5, _excluded5);

      return (/*#__PURE__*/_react.default.createElement(Component, _extends({}, otherProps, {
          className: (0, _classnames.default)('form-control', className, (_classNames4 = {}, _defineProperty(_classNames4, "form-control-".concat(sizing), sizing), _defineProperty(_classNames4, 'input-group-inset', insetAfter || insetBefore), _defineProperty(_classNames4, 'input-group-inset-after', insetAfter), _defineProperty(_classNames4, 'input-group-inset-before', insetBefore), _classNames4)),
          ref: ref,
          type: type
        }))
      );
    });

    ClayInput.displayName = 'ClayInput';

    var _default = Object.assign(ClayInput, {
      Group: ClayInputGroup,
      GroupInsetItem: ClayInputGroupInsetItem,
      GroupItem: ClayInputGroupItem,
      GroupText: ClayInputGroupText
    });

    exports.default = _default;
  }
});
//# sourceMappingURL=Input.js.map