/*!
 * KoliBri - The accessible HTML-Standard
 */
import{_ as __rest}from"./tslib.es6.js";import{h,Fragment}from"@stencil/core/internal/client";import{c as clsx}from"./clsx.js";import"./common.js";import{d as getDefaultProps,c as checkHasMsg}from"./controller2.js";const InputFc=e=>{const{class:s,msg:l,required:o,disabled:r,touched:t,readonly:a,ariaDescribedBy:i,hideLabel:n,label:c,suggestions:d,value:u}=e,p=__rest(e,["class","msg","required","disabled","touched","readonly","ariaDescribedBy","hideLabel","label","suggestions","value"]),b=checkHasMsg(l,t),g="string"==typeof l?"error":null==l?void 0:l._type,m={"kol-input--disabled":Boolean(r),"kol-input--required":Boolean(o),"kol-input--touched":Boolean(t),"kol-input--readonly":Boolean(a),[`kol-input--${g||"error"}`]:b},y=Object.assign(Object.assign({class:clsx("kol-input",m,s),required:o,disabled:r,readonly:a,type:"text",list:d?`${p.id}-list`:void 0},getDefaultProps({ariaDescribedBy:i,hideLabel:n,label:c})),p);return h(Fragment,null,h("input",Object.assign({},y,{value:u})),d)};export{InputFc as I};