import { type ComponentProps } from 'react'

import { RadioGroup as RadixRadio } from 'radix-ui'

import { type RootStylesProps } from './Radio.styles'

import { Item } from './Item'

type RadioProps = ComponentProps<typeof RadixRadio.Root> & RootStylesProps

function Radio({ children, className, ...props }: RadioProps) {
	return (
		<RadixRadio.Root className={className} {...props}>
			{children}
		</RadixRadio.Root>
	)
}

Radio.Item = Item

export { Radio }
