import { createContext, useContext } from 'react';

const RadioGroupContext = createContext(undefined);
/**
 * Returns the group context, or undefined when used outside a Radio.Group.
 * This allows standalone Radio usage without a Group wrapper.
 */
function useRadioGroupContext() {
    return useContext(RadioGroupContext);
}

export { RadioGroupContext, useRadioGroupContext };
