Liferay.Loader.define("@liferay/object-js-components-web@1.0.58/components/FieldBase",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/popover","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","./FieldFeedback","./FieldBase.scss"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldBase=function FieldBase({children:e,className:t,disabled:a,errorMessage:d,helpMessage:s,hideFeedback:f,id:p,label:m,popover:y,required:b,tooltip:g,warningMessage:_}){const[h,q]=(0,c.useState)(!1);return c.default.createElement(l.default.Group,{className:(0,o.default)(t,{"has-error":d,"has-warning":_&&!d})},m&&c.default.createElement("label",{className:(0,o.default)({disabled:a}),htmlFor:p},m,b&&c.default.createElement(RequiredMask,null)),g&&c.default.createElement(c.default.Fragment,null," ",c.default.createElement(i.ClayTooltipProvider,null,c.default.createElement("span",{"data-tooltip-align":"top",title:g},c.default.createElement(r.default,{className:"lfr-objects__field-base-tooltip-icon",symbol:"question-circle-full"})))),y&&c.default.createElement(c.default.Fragment,null," ",c.default.createElement(n.default,{alignPosition:y.alignPosition,disableScroll:!0,header:y.header,show:h,trigger:c.default.createElement(r.default,{className:"lfr-objects__field-base-tooltip-icon",onMouseOut:()=>q(!1),onMouseOver:()=>q(!0),symbol:"question-circle-full"})},y.content)),e,!f&&c.default.createElement(u.FieldFeedback,{errorMessage:d,helpMessage:s,warningMessage:_}))};var l=_interopRequireDefault(a("@frontend-taglib-clay$clayui/form")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),n=_interopRequireDefault(a("@frontend-taglib-clay$clayui/popover")),i=a("@frontend-taglib-clay$clayui/tooltip"),o=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),c=function _interopRequireWildcard(e){if(e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache();if(t&&t.has(e))return t.get(e);var a={},l=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var n=l?Object.getOwnPropertyDescriptor(e,r):null;n&&(n.get||n.set)?Object.defineProperty(a,r,n):a[r]=e[r]}a.default=e,t&&t.set(e,a);return a}(a("liferay!frontend-js-react-web$react")),u=a("./FieldFeedback");function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function RequiredMask(){return c.default.createElement(c.default.Fragment,null,c.default.createElement("span",{className:"ml-1 reference-mark text-warning"},c.default.createElement(r.default,{symbol:"asterisk"})),c.default.createElement("span",{className:"hide-accessible sr-only"},Liferay.Language.get("mandatory")))}a("./FieldBase.scss")}}));
//# sourceMappingURL=FieldBase.js.map