import { createContext, useContext } from 'react';

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

export { CheckboxGroupContext, useCheckboxGroupContext };
