import { RadioGroup, useTheme } from "@mui/material"; import FormControl from "@mui/material/FormControl"; import { Controller, useFormContext, type FieldPath, type FieldValues, } from "react-hook-form"; import { LAYOUT } from "@/Utils/Theme/constants"; import { RadioWithDescription } from "@/Components/inputs/Radio"; import { FieldLabel } from "@/Components/inputs/FieldLabel"; export interface FormRadioOption { value: string; label: string; description: string; } interface FormRadioGroupProps { name: FieldPath; options: FormRadioOption[]; fieldLabel?: string; } export const FormRadioGroup = ({ name, options, fieldLabel, }: FormRadioGroupProps) => { const { control } = useFormContext(); const theme = useTheme(); return ( ( {fieldLabel && {fieldLabel}} {options.map((option) => ( ))} )} /> ); };