Liferay.Loader.define("dynamic-data-mapping-form-field-type@5.0.45/LocalizableText/InputComponent.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/form', '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 _form = require("@frontend-taglib-clay$clayui/form");

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

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

    /**
     * Copyright (c) 2000-present Liferay, Inc. All rights reserved.
     *
     * This library is free software; you can redistribute it and/or modify it under
     * the terms of the GNU Lesser General Public License as published by the Free
     * Software Foundation; either version 2.1 of the License, or (at your option)
     * any later version.
     *
     * This library is distributed in the hope that it will be useful, but WITHOUT
     * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
     * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
     * details.
     */
    var InputComponent = function InputComponent(_ref) {
      var displayStyle = _ref.displayStyle,
          inputValue = _ref.inputValue,
          name = _ref.name,
          onFieldBlurred = _ref.onFieldBlurred,
          onFieldChanged = _ref.onFieldChanged,
          onFieldFocused = _ref.onFieldFocused,
          placeholder = _ref.placeholder,
          readOnly = _ref.readOnly;

      if (displayStyle === 'multiline') {
        return _react["default"].createElement(_form.ClayInput.GroupItem, null, _react["default"].createElement("textarea", {
          className: "ddm-field-text form-control",
          disabled: readOnly,
          id: "".concat(name, "inputValue"),
          onBlur: onFieldBlurred,
          onChange: onFieldChanged,
          onFocus: onFieldFocused,
          placeholder: placeholder,
          type: "text",
          value: inputValue
        }, inputValue));
      }

      return _react["default"].createElement(_form.ClayInput.GroupItem, {
        append: true
      }, _react["default"].createElement("input", {
        className: "ddm-field-text form-control",
        "data-testid": "visibleChangeInput",
        disabled: readOnly,
        id: "".concat(name, "inputValue"),
        onBlur: onFieldBlurred,
        onChange: onFieldChanged,
        onFocus: onFieldFocused,
        placeholder: placeholder,
        type: "text",
        value: inputValue
      }));
    };

    var _default = InputComponent;
    exports["default"] = _default;
    //# sourceMappingURL=InputComponent.es.js.map
  }
});
//# sourceMappingURL=InputComponent.es.js.map