import { createContext, useContext, ReactNode } from "react"; export interface ScaleContextValue { scale: number; offsetX: number; offsetY: number; DESIGN_WIDTH: number; DESIGN_HEIGHT: number; } const ScaleContext = createContext(null); export function ScaleProvider({ children, value, }: { children: ReactNode; value: ScaleContextValue; }) { return ( {children} ); } export function useScale() { const context = useContext(ScaleContext); if (!context) { throw new Error("useScale must be used within ScaleProvider"); } return context; }