import { createContext, useContext } from 'react';

const SelectableCardContext = createContext(undefined);
function useSelectableCardContext() {
    const context = useContext(SelectableCardContext);
    if (!context) {
        throw new Error("SelectableCard must be used within a SelectableCard.Group");
    }
    return context;
}

export { SelectableCardContext, useSelectableCardContext };
