'use client';
import { jsx as _jsx } from "react/jsx-runtime";
import React from 'react';
import { RadioGroupField } from '../fragments/radio-group-field/index.js';
import { SelectField } from '../fragments/select-field/index.js';
const EnumField = React.forwardRef(({ variant = 'auto', options = [], ...props }, ref) => {
    const radio = (_jsx(RadioGroupField, { options: options, ...props, ref: ref }));
    const select = (_jsx(SelectField, { options: options, ...props, ref: ref }));
    switch (variant) {
        case 'RadioGroup':
            return radio;
        case 'Select':
            return select;
        case 'auto': {
            const favoriteOptionsLength = 'favoriteOptions' in props && props.favoriteOptions !== undefined ? props.favoriteOptions.length : 0;
            return options.length + favoriteOptionsLength < 6 ? radio : select;
        }
    }
});
EnumField.displayName = 'EnumField';
export { EnumField };
//# sourceMappingURL=enum-field.js.map