import{_ as s}from"./Heading-DT8fK42U-BBz359Il.js";import{h as _}from"./index-DscFWUNz.js";import{I as c}from"./Input-Dfunc1i_--f2frXLw.js";import{g as u}from"./FormFieldStateWrapper-B7PqxuTo-B9gPPu8s.js";/*!
 * KoliBri - The accessible HTML-Standard
 */const d=i=>{var{id:r,suggestions:o}=i,n=s(i,["id","suggestions"]);return o?_("datalist",Object.assign({id:`${r}-list`},n),o.map(l=>_("option",{value:l}))):null};function m(i,r,o){var n;const g=[...u(i).ariaDescribedBy,...(n=r.ariaDescribedBy)!==null&&n!==void 0?n:[]],e={id:i._id,hideLabel:i._hideLabel,label:i._label,disabled:i._disabled,name:i._name};return"_accessKey"in i&&(e.accessKey=i._accessKey),"_type"in i&&(e.type=i._type),"_value"in i&&(e.value=i._value),"_required"in i&&(e.required=i._required),"_maxLength"in i&&"_maxLengthBehavior"in i&&i._maxLengthBehavior==="hard"&&(e.maxlength=i._maxLength),"_placeholder"in i&&(e.placeholder=i._placeholder),"_autoComplete"in i&&(e.autoComplete=i._autoComplete),"_spellCheck"in i&&(e.spellcheck=i._spellCheck),"_pattern"in i&&(e.pattern=i._pattern),"_readOnly"in i&&(e.readonly=i._readOnly),"_min"in i&&(e.min=i._min),"_max"in i&&(e.max=i._max),"_step"in i&&(e.step=i._step),"_multiple"in i&&(e.multiple=i._multiple),"_checked"in i&&(e.checked=i._checked),"_indeterminate"in i&&(e.indeterminate=i._indeterminate),"_touched"in i&&(e.touched=i._touched),"_msg"in i&&(e.msg=i._msg),"_shortKey"in i&&(e["aria-keyshortcuts"]=i._shortKey),"_suggestions"in i&&!o&&Array.isArray(i._suggestions)&&i._suggestions.length>0&&(e.suggestions=_(d,{id:i._id,suggestions:i._suggestions})),Object.assign(Object.assign(Object.assign({},e),r),{ariaDescribedBy:g})}const b=i=>{var{state:r,customSuggestions:o}=i,n=s(i,["state","customSuggestions"]);return _(c,Object.assign({},m(r,n,o)))};export{b as I,d as S};
//# sourceMappingURL=InputStateWrapper--oSOR1R1-CC4JSxji.js.map
