import React from "react"; import type { RebaseRegistryController, RebaseCMSConfig, RebaseStudioConfig, RebaseAuthViewConfig } from "@rebasepro/cms-types"; /** * Split into two contexts to prevent infinite re-render loops: * - DispatchContext: stable register/unregister functions (never changes identity) * - StateContext: the current config values (changes when modules register) * * Feature components (RebaseAuth, RebaseCMS, RebaseStudio) only consume * the dispatch context, so registering does NOT cause them to re-render. * RebaseShell consumes state context to read the collected configs. */ interface RegistryDispatch { registerAdmin: (config: RebaseCMSConfig) => void; unregisterAdmin: () => void; registerStudio: (config: RebaseStudioConfig) => void; unregisterStudio: () => void; registerAuth: (config: RebaseAuthViewConfig) => void; unregisterAuth: () => void; } export declare function RebaseRegistryProvider({ children }: { children: React.ReactNode; }): React.JSX.Element; /** * Returns the full registry (state + dispatch). * Use this in RebaseShell where you need to read configs. */ export declare function useRebaseRegistry(): RebaseRegistryController; /** * Returns only the stable dispatch functions. * Use this in feature components (RebaseAuth, RebaseCMS, RebaseStudio) * to avoid re-render loops. */ export declare function useRebaseRegistryDispatch(): RegistryDispatch; export {};