Liferay.Loader.define("@liferay/search-experiences-web@3.0.30/semantic_search/js/configuration/Input",["module","exports","require","@frontend-taglib-clay$clayui/form","@frontend-taglib-clay$clayui/icon","@frontend-taglib-clay$clayui/tooltip","liferay!frontend-js-react-web$classnames","liferay!frontend-js-react-web$react","./ModelAutocomplete"],(function(e,t,a){window;{Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var l=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("@frontend-taglib-clay$clayui/form")),r=_interopRequireDefault(a("@frontend-taglib-clay$clayui/icon")),n=a("@frontend-taglib-clay$clayui/tooltip"),u=_interopRequireDefault(a("liferay!frontend-js-react-web$classnames")),i=_interopRequireDefault(a("liferay!frontend-js-react-web$react")),c=_interopRequireDefault(a("./ModelAutocomplete"));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}const e=6;var o=function Input({error:t,children:a,helpText:o,label:d,name:f,onBlur:s,onChange:m,items:p,options:y={},required:b=!1,touched:g=!1,type:h,value:v}){const _handleEventChange=e=>{m(e.target.value)};return i.default.createElement(l.default.Group,{className:(0,u.default)({"has-error":t&&g})},i.default.createElement("label",{htmlFor:f},d,b&&i.default.createElement("span",{className:"reference-mark"},i.default.createElement(r.default,{symbol:"asterisk"})),o&&i.default.createElement(n.ClayTooltipProvider,null,i.default.createElement("span",{className:"ml-2",title:o},i.default.createElement(r.default,{symbol:"question-circle-full"})))),(()=>{switch(h){case"model":return i.default.createElement(c.default,{label:d,name:f,onBlur:s,onChange:m,required:b,value:v});case"multiple":return i.default.createElement(l.ClaySelectBox,{"aria-label":d,className:"mb-0",items:p,multiple:!0,name:f,onBlur:s,onSelectChange:m,required:b,size:e,value:v});case"number":return i.default.createElement(l.ClayInput,{"aria-label":d,id:f,max:y.max,min:y.min,name:f,onBlur:s,onChange:_handleEventChange,required:b,type:"number",value:v});case"select":return i.default.createElement(l.ClaySelect,{"aria-label":d,id:f,name:f,onBlur:s,onChange:_handleEventChange,required:b,value:v},p.map((e=>i.default.createElement(l.ClaySelect.Option,{key:e.value,label:e.label,value:e.value}))));default:return i.default.createElement(l.ClayInput,{"aria-label":d,id:f,name:f,onBlur:s,onChange:_handleEventChange,required:b,type:h||"text",value:v||""})}})(),t&&g&&i.default.createElement(l.default.FeedbackGroup,null,i.default.createElement(l.default.FeedbackItem,null,t)),a)};t.default=o}}));
//# sourceMappingURL=Input.js.map