/**
 * EntityStoreProvider
 *
 * Normalized reactive entity store for Orbital applications.
 * Stores entities in ID-keyed Maps with ordered ID lists.
 * Provides operation-specific methods (setAll, upsertOne, addOne,
 * updateOne, removeOne) and selector hooks (useEntityRef for
 * collections, useEntityById for single entities).
 *
 * Every mutation creates new Map/array objects (immutable values).
 * Identity (the store key) advances to a new value on each write.
 * Follows the Clojure epochal time model from Almadar_Orb_IO.md.
 *
 * @packageDocumentation
 */
import React, { type ReactNode } from 'react';
type StoreListener = () => void;
type WatchCallback = (oldData: unknown[], newData: unknown[]) => void;
export declare function subscribeToStore(listener: StoreListener): () => void;
/**
 * Subscribe to an entity collection reactively.
 * Returns the full ordered array. Re-renders when the collection changes.
 *
 * Client-side implementation of `["ref", "EntityType"]`.
 */
export declare function useEntityRef(entityType: string): unknown[];
/**
 * Subscribe to a single entity by ID reactively.
 * Returns the entity record or null. Re-renders when the entity changes.
 *
 * Client-side implementation of `["fetch", "EntityType", { id: ... }]`.
 */
export declare function useEntityById(entityType: string, id: string | undefined): Record<string, unknown> | null;
/**
 * Register a callback that fires when an entity collection changes.
 * Receives (oldData, newData) for side effects (notify, emit, log).
 *
 * Client-side implementation of `["watch", "EntityType", effects]`.
 */
export declare function useEntityWatch(entityType: string, callback: WatchCallback): void;
export interface EntityStoreContextValue {
    setAll: (entityType: string, records: unknown[]) => void;
    upsertOne: (entityType: string, record: Record<string, unknown>) => void;
    addOne: (entityType: string, record: Record<string, unknown>) => void;
    updateOne: (entityType: string, id: string, changes: Partial<Record<string, unknown>>) => void;
    removeOne: (entityType: string, id: string) => void;
    getSnapshot: (entityType: string) => unknown[];
    getById: (entityType: string, id: string) => Record<string, unknown> | null;
}
export declare const EntityStoreContext: React.Context<EntityStoreContextValue>;
/**
 * Access the entity store operations.
 * Used by useOrbitalBridge and OrbPreview to push server response data into the store.
 */
export declare function useEntityStore(): EntityStoreContextValue;
/**
 * Provider component. Wrap the app or page with this to enable entity reactivity.
 * Already included in OrbitalProvider.
 */
export declare function EntityStoreProvider({ children }: {
    children: ReactNode;
}): React.ReactElement;
export {};
