'use client' import { useContext } from 'react' import { SDKContextValue } from './context-types' import { SDKContext } from './context-provider' // ============================================================================= // HOOK // ============================================================================= export function useSDK(): SDKContextValue { const context = useContext(SDKContext) if (!context) { throw new Error('useSDK must be used within SDKProvider') } return context }