/*!
 * KoliBri - The accessible HTML-Standard
 */
import { __rest } from "tslib";
import { h } from "@stencil/core";
import { getMsgType, isMsgDefinedAndInputTouched } from "../../../schema";
import clsx from "../../../utils/clsx";
import { getDefaultProps } from "../_helpers/getDefaultProps";
const TextAreaFc = (props) => {
    const { class: classNames, msg, touched, readonly, disabled, required, ariaDescribedBy, hideLabel, label } = props, other = __rest(props, ["class", "msg", "touched", "readonly", "disabled", "required", "ariaDescribedBy", "hideLabel", "label"]);
    const stateCssClasses = {
        ['kol-textarea--disabled']: Boolean(disabled),
        ['kol-textarea--required']: Boolean(required),
        ['kol-textarea--touched']: Boolean(touched),
        ['kol-textarea--readonly']: Boolean(readonly),
        [`kol-textarea--${getMsgType(msg)}`]: isMsgDefinedAndInputTouched(msg, touched),
    };
    const inputProps = Object.assign(Object.assign({ class: clsx('kol-textarea', stateCssClasses, classNames), required: required, disabled: disabled, readonly: readonly }, getDefaultProps({ ariaDescribedBy, hideLabel, label })), other);
    return h("textarea", Object.assign({}, inputProps));
};
export default TextAreaFc;
//# sourceMappingURL=TextArea.js.map
