import { jsx as _jsx } from "react/jsx-runtime";
import React from "react";
import { RadioGroupField, } from "../radio-group-field/radio-group-field.js";
import { SelectField, } from "../select-field/select-field.js";
export 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":
            return options.length < 6 ? radio : select;
    }
});
EnumField.displayName = "EnumField";
//# sourceMappingURL=enum-field.js.map