import { createContext, useContext } from 'react' import * as React from 'react' import type { RadioGroupState } from '@react-stately/radio' const RadioContext = createContext(null) type RadioProviderProps = React.PropsWithChildren<{ value: RadioGroupState }> export const RadioProvider: React.FC = ({ value, children, }) => { return {children} } export const useRadioContext = () => { const state = useContext(RadioContext) if (state === null) throw new Error('`` is not likely mounted.') return state }