/*!
 * KoliBri - The accessible HTML-Standard
 */
import { a as __rest } from './tslib.es6-QNbPBOk5.js';
import { h, F as Fragment } from './index-Brmny3Vg.js';
import './common-DEEjER7G.js';
import { i as isMsgDefinedAndInputTouched, c as getDefaultProps, g as getMsgType } from './FormFieldStateWrapper-DCXQnRBu.js';
import { c as clsx } from './clsx-COFh-Vc8.js';
import { a as createRelatedUniqueId } from './dev.utils-HhhlYW_9.js';

const InputFc = (props) => {
    const { class: classNames, msg, required, disabled, touched, readonly, ariaDescribedBy, hideLabel, label, suggestions, value } = props, other = __rest(props, ["class", "msg", "required", "disabled", "touched", "readonly", "ariaDescribedBy", "hideLabel", "label", "suggestions", "value"]);
    const stateCssClasses = {
        ['kol-input--disabled']: Boolean(disabled),
        ['kol-input--required']: Boolean(required),
        ['kol-input--touched']: Boolean(touched),
        ['kol-input--readonly']: Boolean(readonly),
        [`kol-input--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),
    };
    const inputProps = Object.assign(Object.assign({ class: clsx('kol-input', stateCssClasses, classNames), required: required, disabled: disabled, readonly: readonly, type: 'text', list: suggestions && typeof other.id === 'string' ? createRelatedUniqueId(other.id, 'list') : undefined }, getDefaultProps({ ariaDescribedBy, hideLabel, label })), other);
    return (h(Fragment, null, h("input", Object.assign({}, inputProps, { value: value })), suggestions));
};

export { InputFc as I };
//# sourceMappingURL=Input-Chj5JCQv.js.map

//# sourceMappingURL=Input-Chj5JCQv.js.map