Liferay.Loader.define("dynamic-data-mapping-form-field-type@5.0.110/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 };
    }

    /**
     * SPDX-FileCopyrightText: (c) 2000 Liferay, Inc. https://liferay.com
     * SPDX-License-Identifier: LGPL-2.1-or-later OR LicenseRef-Liferay-DXP-EULA-2.0.0-2023-06
     */
    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 (/*#__PURE__*/_react.default.createElement(_form.ClayInput.GroupItem, null, /*#__PURE__*/_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 (/*#__PURE__*/_react.default.createElement(_form.ClayInput.GroupItem, {
          append: true
        }, /*#__PURE__*/_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