/**
 * @license MIT
 * author: Cube Dev Team
 * @cube-dev/ui-kit v0.0.0-canary-d4047d7
 * Released under the MIT license.
 */

const createFieldWrapperPropsKeys = (arr) => new Set(arr);
const fieldWrapperPropsKeys = createFieldWrapperPropsKeys([
    'as',
    'validationState',
    'styles',
    'isRequired',
    'isDisabled',
    'fieldProps',
    'isHidden',
    'label',
    'labelPosition',
    'labelSuffix',
    'labelStyles',
    'labelProps',
    'description',
    'requiredMark',
    'tooltip',
    'extra',
    'necessityLabel',
    'necessityIndicator',
    'message',
    'messageStyles',
    'errorMessage',
    'Component',
]);
export function extractFieldWrapperProps(props) {
    const fieldWrapperProps = {};
    const rest = {};
    for (const [key, prop] of Object.entries(props)) {
        if (fieldWrapperPropsKeys.has(key)) {
            fieldWrapperProps[key] = prop;
        }
        else {
            rest[key] = prop;
        }
    }
    return { fieldWrapperProps, rest };
}

        