/*!
 * KoliBri - The accessible HTML-Standard
 */
import{_ as i}from"./tslib.es6-1173d062.js";import{h as e}from"./index-91489a9f.js";import{g as s}from"./getRenderStates-a7a33541.js";import{K as t}from"./Input-40160769.js";import{a as n}from"./FormFieldMsg-1ed3f51d.js";const a=s=>{var{id:t,suggestions:n}=s,a=i(s,["id","suggestions"]);return n?e("datalist",Object.assign({id:`${t}-list`},a),n.map((i=>e("option",{value:i})))):null},r=a;function o(i,t){const{ariaDescribedBy:a}=s(i),_={id:i._id,hideLabel:i._hideLabel,label:i._label,accessKey:i._accessKey,disabled:i._disabled,name:i._name,ariaDescribedBy:a};if("_type"in i&&(_.type=i._type),"_value"in i&&(_.value=i._value),"_required"in i&&(_.required=i._required),"_maxLength"in i&&(_.maxlength=i._maxLength),"_placeholder"in i&&(_.placeholder=i._placeholder),"_autoComplete"in i&&(_.autoComplete=i._autoComplete),"_spellCheck"in i&&(_.spellcheck=i._spellCheck),"_pattern"in i&&(_.pattern=i._pattern),"_readOnly"in i&&(_.readonly=i._readOnly),"_min"in i&&(_.min=i._min),"_max"in i&&(_.max=i._max),"_step"in i&&(_.step=i._step),"_multiple"in i&&(_.multiple=i._multiple),"_checked"in i&&(_.checked=i._checked),"_indeterminate"in i&&(_.indeterminate=i._indeterminate),"_touched"in i&&(_.touched=i._touched),"_msg"in i&&(_.msg=n(i._msg)),"_suggestions"in i&&!t){Array.isArray(i._suggestions)&&i._suggestions.length>0&&(_.suggestions=e(r,{id:i._id,suggestions:i._suggestions}))}return _}const f=s=>{var{state:n,customSuggestions:a}=s,r=i(s,["state","customSuggestions"]);return e(t,Object.assign({},o(n,a),r))},d=f;export{d as K,r as a};