/*!
 * KoliBri - The accessible HTML-Standard
 */
"use strict";const tslib_es6=require("./tslib.es6-5e301284.js"),index=require("./index-07fcbac9.js"),getRenderStates=require("./getRenderStates-3c874ec5.js"),Input=require("./Input-766cb8ca.js"),FormFieldMsg=require("./FormFieldMsg-370f014e.js"),SuggestionsFc=e=>{var{id:t,suggestions:s}=e,i=tslib_es6.__rest(e,["id","suggestions"]);return s?index.h("datalist",Object.assign({id:`${t}-list`},i),s.map((e=>index.h("option",{value:e})))):null},KolSuggestionsFc=SuggestionsFc;function getInputProps(e,t){const{ariaDescribedBy:s}=getRenderStates.getRenderStates(e),i={id:e._id,hideLabel:e._hideLabel,label:e._label,accessKey:e._accessKey,disabled:e._disabled,name:e._name,ariaDescribedBy:s};if("_type"in e&&(i.type=e._type),"_value"in e&&(i.value=e._value),"_required"in e&&(i.required=e._required),"_maxLength"in e&&(i.maxlength=e._maxLength),"_placeholder"in e&&(i.placeholder=e._placeholder),"_autoComplete"in e&&(i.autoComplete=e._autoComplete),"_spellCheck"in e&&(i.spellcheck=e._spellCheck),"_pattern"in e&&(i.pattern=e._pattern),"_readOnly"in e&&(i.readonly=e._readOnly),"_min"in e&&(i.min=e._min),"_max"in e&&(i.max=e._max),"_step"in e&&(i.step=e._step),"_multiple"in e&&(i.multiple=e._multiple),"_checked"in e&&(i.checked=e._checked),"_indeterminate"in e&&(i.indeterminate=e._indeterminate),"_touched"in e&&(i.touched=e._touched),"_msg"in e&&(i.msg=FormFieldMsg.convertMsgToInternMsg(e._msg)),"_suggestions"in e&&!t){Array.isArray(e._suggestions)&&e._suggestions.length>0&&(i.suggestions=index.h(KolSuggestionsFc,{id:e._id,suggestions:e._suggestions}))}return i}const InputStateWrapper=e=>{var{state:t,customSuggestions:s}=e,i=tslib_es6.__rest(e,["state","customSuggestions"]);return index.h(Input.KolInputFc,Object.assign({},getInputProps(t,s),i))},KolInputStateWrapperFc=InputStateWrapper;exports.KolInputStateWrapperFc=KolInputStateWrapperFc,exports.KolSuggestionsFc=KolSuggestionsFc;