import { InputCheckSize } from '@mezzanine-ui/core/_internal/input-check'; import { ChangeEventHandler, ReactNode } from 'react'; import { InputCheckGroupProps } from '../_internal/InputCheck/InputCheckGroup'; import { RadioNormalProps, RadioSegmentProps } from './Radio'; export interface RadioGroupNormalOption extends Pick { id: string; name: string | number; } export interface RadioGroupSegmentOption extends Pick { id: string; name: string | number; } export interface RadioGroupBaseProps extends Omit { /** * The radios in radio group. */ children?: ReactNode; /** * The default value of radio group. */ defaultValue?: string; /** * Whether the radio group is disabled. * Control the disabled of radios in group if disabled not passed to radio. */ disabled?: boolean; /** * The name of radio group. * Control the name of radios in group if name not passed to radio. */ name?: string; /** * The onChange of radio group. * Will be passed to each radios but composing both instead of overriding. */ onChange?: ChangeEventHandler; /** * The size of radio group. * Control the size of radios in group if size not passed to radio. */ size?: InputCheckSize; /** * The value of radio group. */ value?: string; } export interface RadioGroupNormalProps extends RadioGroupBaseProps { /** * The options of radio group. * Will be ignored if children passed. */ options?: RadioGroupNormalOption[]; /** * The type of radio group. * Control the type of radios in group if type not passed to radio. */ type?: 'radio'; } export interface RadioGroupSegmentProps extends RadioGroupBaseProps { /** * The options of radio group. * Will be ignored if children passed. */ options?: RadioGroupSegmentOption[]; /** * The type of radio group. * Control the type of radios in group if type not passed to radio. */ type: 'segment'; } export type RadioGroupProps = RadioGroupNormalProps | RadioGroupSegmentProps; /** * The react component for `mezzanine` radio group. */ declare const RadioGroup: import("react").ForwardRefExoticComponent>; export default RadioGroup;