import { framer, Synnax } from '@synnaxlabs/client';
import { AsyncDestructor } from '@synnaxlabs/x';
import { Store, StoreConfig } from './store';
import { Status } from '../../status';
/**
 * Arguments for opening a flux streamer.
 *
 * @template ScopedStore - The type of the store
 */
export interface StreamerArgs<ScopedStore extends Store> {
    /** Function to handle errors that occur during streaming */
    handleError: Status.AsyncErrorHandler;
    /** Configuration defining store structure and listeners */
    storeConfig: StoreConfig<ScopedStore>;
    /** Synnax client instance for API access */
    client: Synnax;
    /** Function to open a frame streamer */
    openStreamer: framer.StreamOpener;
    /** The store instance to update with streamed data */
    store: ScopedStore;
}
/**
 * Opens a hardened streamer that listens to configured channels and invokes
 * the appropriate listeners when data changes.
 *
 * @template ScopedStore - The type of the store
 * @param args - Configuration for the streamer
 * @returns A destructor function to close the streamer
 */
export declare const openStreamer: <ScopedStore extends Store>({ openStreamer: streamOpener, storeConfig, handleError, client, store, }: StreamerArgs<ScopedStore>) => Promise<AsyncDestructor>;
//# sourceMappingURL=streamer.d.ts.map