Liferay.Loader.define("adaptive-media-web@5.0.49/adaptive_media/js/form/Components",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react"],(function(e,t,r){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.RequiredMark=t.HelpMessage=t.Input=t.ErrorFeedback=void 0;var a=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 r={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){var l=a?Object.getOwnPropertyDescriptor(e,n):null;l&&(l.get||l.set)?Object.defineProperty(r,n,l):r[n]=e[n]}r.default=e,t&&t.set(e,r);return r}(r("@frontend-taglib-clay$clayui/form")),n=_interopRequireDefault(r("@frontend-taglib-clay$clayui/icon")),l=(_interopRequireDefault(r("liferay!frontend-js-react-web$prop-types")),_interopRequireDefault(r("liferay!frontend-js-react-web$react")));function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}function _extends(){return(_extends=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e}).apply(this,arguments)}function _objectWithoutProperties(e,t){if(null==e)return{};var r,a,n=function _objectWithoutPropertiesLoose(e,t){if(null==e)return{};var r,a,n={},l=Object.keys(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||(n[r]=e[r]);return n}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(a=0;a<l.length;a++)r=l[a],t.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}const ErrorFeedback=({error:e})=>l.default.createElement(a.default.FeedbackGroup,null,l.default.createElement(a.default.FeedbackItem,null,l.default.createElement("span",null,e)));t.ErrorFeedback=ErrorFeedback;const HelpMessage=({message:e})=>l.default.createElement("span",{className:"inline-item-after lfr-portal-tooltip tooltip-icon",title:e},l.default.createElement(n.default,{symbol:"question-circle-full"}));t.HelpMessage=HelpMessage;const Input=e=>{let{disabled:t,error:r,id:n,label:o,name:i,required:u,type:c="text"}=e,f=_objectWithoutProperties(e,["disabled","error","id","label","name","required","type"]);const d=n||i;return l.default.createElement(a.default.Group,{className:r?"has-error":""},l.default.createElement("label",{className:t?"disabled":"",htmlFor:d},o,u&&l.default.createElement(RequiredMark,null)),l.default.createElement(a.ClayInput,_extends({},f,{className:"form-control",component:"textarea"===c?"textarea":"input",disabled:t,id:d,name:i,type:c})),"string"==typeof r&&l.default.createElement(ErrorFeedback,{error:r}))};t.Input=Input;const RequiredMark=()=>l.default.createElement(l.default.Fragment,null,l.default.createElement("span",{className:"inline-item-after reference-mark text-warning"},l.default.createElement(n.default,{symbol:"asterisk"})),l.default.createElement("span",{className:"hide-accessible sr-only"},Liferay.Language.get("required")));t.RequiredMark=RequiredMark}}));
//# sourceMappingURL=Components.js.map