import { type StateCreator, type StoreApi } from 'zustand/vanilla';
export type IslandStoreState = object;
type IslandStoreSnapshot = Record<string, unknown>;
export type IslandStateSnapshot = Record<string, IslandStoreSnapshot>;
type AnyIslandStore = StoreApi<object>;
type IslandStoreInstance = {
    applyExternalSnapshot: (snapshot: IslandStoreSnapshot) => void;
    store: AnyIslandStore;
};
declare const ABSOLUTE_ISLAND_STATE = "__ABS_ISLAND_STATE__";
declare const ABSOLUTE_ISLAND_STORES = "__ABS_ISLAND_STORES__";
declare global {
    var __ABS_ISLAND_STATE__: IslandStateSnapshot | undefined;
    var __ABS_ISLAND_STORES__: Map<string, Set<IslandStoreInstance>> | undefined;
}
export declare const createIslandStore: <TState extends IslandStoreState, TActions extends object>(storeId: string, initialState: TState, createState: StateCreator<TState, [], [], TActions>) => StoreApi<Omit<TState, keyof TActions> & TActions>;
export declare const getIslandStoreServerSnapshot: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected) => TSelected;
export declare const initializeIslandStores: (state: IslandStateSnapshot) => void;
export declare const readIslandStore: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected) => TSelected;
export declare const resetIslandStoreForTesting: () => void;
export declare const subscribeIslandStore: <TState extends IslandStoreState, TSelected>(store: StoreApi<TState>, selector: (state: TState) => TSelected, listener: (value: TSelected) => void) => () => void;
export { ABSOLUTE_ISLAND_STATE, ABSOLUTE_ISLAND_STORES };
