import { Button, Card, Divider, Radio, RadioChangeEvent, Space } from "antd"; import ProText from "components/ProText"; import styles from "./CarRatioGroups.module.css"; import { useTranslation } from "react-i18next"; import CarIcon from "components/Icons/CarIcon"; interface CarRatioGroupsProps { options: { label: string; value: string; price?: string }[]; onRatioClick?: (value: string) => void; onChange?: (e: RadioChangeEvent) => void; value?: string; optionsStyle?: React.CSSProperties; valueStyle?: React.CSSProperties; showDivider?: boolean; } const CarRatioGroups = ({ options, onRatioClick, onChange, value, optionsStyle, valueStyle, showDivider = false, ...props }: CarRatioGroupsProps) => { const handleChange = (e: RadioChangeEvent) => { // If onChange is provided (from Form.Item), use it if (onChange) { onChange(e); } // Also call onRatioClick if provided (for backward compatibility) if (onRatioClick) { onRatioClick(e.target.value); } }; return (