import type { PaseoApi } from "@getpaseo/client"; import { createContext, useContext, type ReactNode } from "react"; const PaseoApiContext = createContext(null); export function usePaseoContextValue(): PaseoApi | null { return useContext(PaseoApiContext); } export function PaseoApiProvider({ children, paseo }: { children: ReactNode; paseo: PaseoApi }) { return {children}; } export function usePaseo(): PaseoApi { const paseo = usePaseoContextValue(); if (!paseo) throw new Error("usePaseo must run inside a contributed plugin surface"); return paseo; }