import { createContext, useContext } from 'react';
/**
 * Provider wraps the user's React tree; consumers use useInkInstance()
 * to access the handle. Default null so a stray <Static> outside the
 * provider no-ops instead of throwing.
 */
export const InkInstanceContext = createContext(null);
// eslint-disable-next-line custom-rules/no-top-level-side-effects
InkInstanceContext.displayName = 'InternalInkInstanceContext';
/**
 * Hook: get the handle. Returns null when rendered outside the Ink
 * provider (e.g. isolated component tests that don't wrap in provider).
 */
export function useInkInstance() {
    return useContext(InkInstanceContext);
}
//# sourceMappingURL=InkInstanceContext.js.map