"use client";
import { createContext, useContext } from "react";
/**
 * React context that holds the model registry fetched from the public API.
 *
 * Populated by {@link StigmerProvider} on mount. Consumer hooks read from
 * this context instead of a static JSON import, enabling always-fresh
 * model data without npm package updates.
 */
export const ModelRegistryContext = createContext({
    models: [],
    isLoading: true,
    error: null,
    refetch: () => { },
});
/**
 * Internal hook to read the model registry from context.
 * Throws if called outside a StigmerProvider.
 */
export function useModelRegistryContext() {
    return useContext(ModelRegistryContext);
}
//# sourceMappingURL=ModelRegistryContext.js.map