Liferay.Loader.define("segments-web@3.0.68/js/components/inputs/StringInput.es",["module","exports","require","@frontend-taglib-clay$clayui/form","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$prop-types","liferay!frontend-js-react-web$react","../../utils/odata.es"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var n=a("@frontend-taglib-clay$clayui/form"),r=i(a("liferay!frontend-js-react-web$classnames")),l=(i(a("liferay!frontend-js-react-web$prop-types")),i(a("liferay!frontend-js-react-web$react"))),s=a("../../utils/odata.es");function i(e){return e&&e.__esModule?e:{default:e}}function o(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}class e extends l.default.Component{constructor(e){super(e),o(this,"_handleChange",(e=>{this.setState({value:e.target.value}),this.props.onChange({value:e.target.value})})),this.state={value:e.value}}componentDidMount(){this.setState({value:(0,s.unescapeSingleQuotes)(this.props.value)})}render(){const{disabled:e,options:t,renderEmptyValueErrors:a,value:s}=this.props;return t.length?l.default.createElement(n.ClaySelectWithOption,{className:(0,r.default)("criterion-input form-control",{"criterion-input--error":!s}),"data-testid":"options-string",disabled:e,onChange:this._handleChange,options:t.map((e=>({disabled:e.disabled,label:e.label,value:e.value}))),value:s}):l.default.createElement("input",{className:(0,r.default)("criterion-input form-control",{"criterion-input--error":!s&&a}),"data-testid":"simple-string",disabled:e,onChange:this._handleChange,type:"text",value:this.state.value})}}o(e,"defaultProps",{options:[]});var u=e;t.default=u}}));
//# sourceMappingURL=StringInput.es.js.map