/*!
 * KoliBri - The accessible HTML-Standard
 */
'use strict';

var tslib_es6 = require('./tslib.es6-Cm0ytgPY.js');
var index = require('./index-DBbl8tEq.js');
require('./common-DAAt5YQ7.js');
var FormFieldStateWrapper = require('./FormFieldStateWrapper-C93KLp60.js');
var clsx = require('./clsx-Bm_HQUnh.js');
var dev_utils = require('./dev.utils-Cdn-EtYb.js');

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

exports.InputFc = InputFc;
//# sourceMappingURL=Input-BmS5OT6F.js.map

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