import type { BaseFormBuilderProps, GenericFormElementProps, } from "@components/Form/DynamicForm.tsx"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@components/UI/Select.tsx"; import { Controller, type FieldValues } from "react-hook-form"; export interface SelectFieldProps extends BaseFormBuilderProps { type: "select"; selectChange?: (e: string) => void; properties: BaseFormBuilderProps["properties"] & { enumValue: { [s: string]: string | number; }; formatEnumName?: boolean; }; } export function SelectInput({ control, disabled, field, }: GenericFormElementProps>) { return ( { const { enumValue, formatEnumName, ...remainingProperties } = field.properties; const optionsEnumValues = enumValue ? Object.entries(enumValue).filter( (value) => typeof value[1] === "number", ) : []; return ( ); }} /> ); }