import { FunctionComponent } from 'react';
import Radio, { RadioProps } from './Radio';
import RadioGroup from './RadioGroup';
import RadioButton from './RadioButton';
import RadioButtonGroup from './RadioButtonGroup';

interface CompoundRadioProps extends FunctionComponent<RadioProps> {
  Button: typeof RadioButton;
  ButtonGroup: typeof RadioButtonGroup;
  Group: typeof RadioGroup;
}

const CompoundRadio = Radio as CompoundRadioProps;

CompoundRadio.Group = RadioGroup;
CompoundRadio.Button = RadioButton;
CompoundRadio.ButtonGroup = RadioButtonGroup;

export default CompoundRadio;
