Liferay.Loader.define("layout-template-admin-web@1.0.64/js/modal/FormField.es", ['module', 'exports', 'require', '@frontend-taglib-clay$clayui/icon', 'frontend-js-react-web$classnames', 'frontend-js-react-web$prop-types', 'frontend-js-react-web$react'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.FormField = void 0;

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

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

    var _propTypes = _interopRequireDefault(require("frontend-js-react-web$prop-types"));

    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 FormField = function FormField(_ref) {
      var children = _ref.children,
          error = _ref.error,
          id = _ref.id,
          name = _ref.name;
      var hasError = error != null;
      return (/*#__PURE__*/_react.default.createElement("div", {
          className: (0, _classnames.default)({
            'form-group': true,
            'has-error': hasError
          })
        }, /*#__PURE__*/_react.default.createElement("label", {
          htmlFor: id
        }, name, /*#__PURE__*/_react.default.createElement("span", {
          className: "reference-mark"
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          symbol: "asterisk"
        }))), children, hasError && /*#__PURE__*/_react.default.createElement("div", {
          className: "form-feedback-item"
        }, /*#__PURE__*/_react.default.createElement("span", {
          className: "form-feedback-indicator mr-1"
        }, /*#__PURE__*/_react.default.createElement(_icon.default, {
          symbol: "exclamation-full"
        })), error))
      );
    };

    exports.FormField = FormField;
    var _default = FormField;
    exports.default = _default;
    //# sourceMappingURL=FormField.es.js.map
  }
});
//# sourceMappingURL=FormField.es.js.map