import React, { createContext, useContext } from 'react';

export type SceneOverlayViewContextValue = {
  rootRef: React.RefObject<HTMLDivElement | null>;
  view: { w: number; h: number };
};

export const SceneOverlayViewContext = createContext<SceneOverlayViewContextValue | null>(null);

export function useSceneOverlayView(): SceneOverlayViewContextValue | null {
  return useContext(SceneOverlayViewContext);
}
