/*!
 * KoliBri - The accessible HTML-Standard
 */
import { __rest } from "tslib";
import { h } from "@stencil/core";
import KolFieldControlFc from "../../functional-components/FieldControl";
function getFieldControlProps(state) {
    const props = {
        id: state._id,
        disabled: state._disabled,
        msg: state._msg,
        hint: state._hint,
        label: state._label,
        hideLabel: state._hideLabel,
        touched: state._touched,
    };
    if ('_required' in state) {
        props.required = state._required;
    }
    if ('_readOnly' in state) {
        props.readonly = state._readOnly;
    }
    if ('_labelAlign' in state) {
        props.labelAlign = state._labelAlign;
    }
    if ('_accessKey' in state) {
        props.accessKey = state._accessKey;
    }
    if ('_shortKey' in state) {
        props.shortKey = state._shortKey;
    }
    return props;
}
const FieldControlStateWrapper = (_a, children) => {
    var { state } = _a, other = __rest(_a, ["state"]);
    return (h(KolFieldControlFc, Object.assign({}, getFieldControlProps(state), other), children));
};
export default FieldControlStateWrapper;
//# sourceMappingURL=FieldControlStateWrapper.js.map
