import type { ComponentType } from 'react'; import type { DebugFeature, DebugFeatureRenderProps } from '../types'; import type { EventChannel } from './createEventChannel'; import type { StorageAdapter } from './StorageAdapter'; export interface ChannelFeaturePersistConfig { storage: StorageAdapter; storageKey: string; maxPersist: number; debounceMs?: number; serialize?: (entry: TEntry) => unknown; isActive?: () => boolean; } /** * Generic factory for features that subscribe to an event channel. * Eliminates boilerplate across channel-based features (Track, Navigation, Zustand). * * @param getChannel - Function returning the current channel (supports test resets) * @param toEntry - Maps a payload + auto-generated id to a typed log entry * @param options - Feature name, label, render component, and optional maxLogs */ export declare function createChannelFeature(getChannel: () => EventChannel, toEntry: (payload: TPayload, id: string) => TEntry, options: { name: string; label: string; renderContent?: ComponentType>; maxLogs?: number; persist?: ChannelFeaturePersistConfig; /** Return null to skip, or the (possibly modified) payload to proceed. */ beforePush?: (payload: TPayload) => TPayload | null; /** Called after channel subscription in setup. Return a cleanup function. */ onSetup?: () => (() => void) | void; }): DebugFeature; //# sourceMappingURL=createChannelFeature.d.ts.map