import { useContext } from 'react'; import { createContext } from 'react'; import { useNWCInternal } from '@/hooks/useNWC'; type NWCContextType = ReturnType; export const NWCContext = createContext(null); export function useNWC(): NWCContextType { const context = useContext(NWCContext); if (!context) { throw new Error('useNWC must be used within a NWCProvider'); } return context; }