Liferay.Loader.define("change-tracking-web@2.0.87/publications/js/components/form/TextField",["module","exports","require","@frontend-taglib-clay$clayui/form","frontend-js-web","liferay!frontend-js-react-web$react"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=_interopRequireWildcard(a("@frontend-taglib-clay$clayui/form")),r=a("frontend-js-web"),n=_interopRequireWildcard(a("liferay!frontend-js-react-web$react"));function _getRequireWildcardCache(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return _getRequireWildcardCache=function _getRequireWildcardCache(){return e},e}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]}return a.default=e,t&&t.set(e,a),a}var _default=({ariaLabel:e,componentType:t,fieldValue:a,label:u,maxLength:i,onChange:o,placeholderValue:c,required:d,validateLength:f})=>{const[s,p]=(0,n.useState)("");return n.default.createElement(n.default.Fragment,null,n.default.createElement(l.default.Group,{className:s?"has-error":""},n.default.createElement("label",null,u,d&&" ",d&&n.default.createElement("svg",{className:"lexicon-icon lexicon-icon-asterisk reference-mark",focusable:"false",role:"presentation",viewBox:"0 0 512 512"},n.default.createElement("path",{className:"lexicon-icon-outline",d:"M323.6,190l146.7-48.8L512,263.9l-149.2,47.6l93.6,125.2l-104.9,76.3l-96.1-126.4l-93.6,126.4L56.9,435.3l92.3-123.9L0,263.8l40.4-122.6L188.4,190v-159h135.3L323.6,190L323.6,190z"}))),n.default.createElement(l.ClayInput,{"aria-label":e||null,component:t,onBlur:()=>{d&&!(e=>!!e.length)(a)?p(Liferay.Language.get("this-field-is-required")):!0!==f||(i?a.length<=i:a.length<=75)?p(""):p((0,r.sub)(Liferay.Language.get("value-exceeds-maximum-length-of-x"),i||75))},onChange:o,placeholder:c||null,required:d?"required":null,type:"text",value:a}),s&&n.default.createElement(l.default.FeedbackGroup,null,n.default.createElement(l.default.FeedbackItem,null,n.default.createElement(l.default.FeedbackIndicator,{symbol:"exclamation-full"}),s))))};t.default=_default}}));
//# sourceMappingURL=TextField.js.map