import { createContext } from 'react';

/**
 * Context value shape:
 *   enabled   — false means all namespaced shortcuts are bypassed
 *   namespaces — null means "all namespaces allowed"; string[] means only those listed
 *
 * @typedef {Object} ShortcutsConfig
 * @property {boolean} enabled
 * @property {string[] | null} namespaces
 */

/**
 * Default: shortcuts are OFF so that consuming apps get no surprise bindings
 * from impact-ui components unless they explicitly opt in via <ShortcutsProvider>.
 *
 * @type {import('react').Context<ShortcutsConfig>}
 */
export const ShortcutsConfigContext = createContext({
  enabled: false,
  namespaces: null,
});
