import * as react from 'react'; import { ReactNode } from 'react'; import { StoreApi } from 'zustand/vanilla'; import { b as ReactorQueueClientOptions, R as ReactorQueueClient, a as QueueState } from './client-DQwkfBOY.js'; export { Q as QueuePhase } from './client-DQwkfBOY.js'; /** Stable action surface exposed alongside queue state. */ interface QueueActions { connect: () => void; leave: () => void; rejoin: () => void; claim: () => void; endSession: () => void; /** Resolver to pass straight into the Reactor SDK's `getJwt` prop. */ getJwt: () => Promise; } interface QueueContextValue { client: ReactorQueueClient; store: StoreApi; actions: QueueActions; } interface ReactorQueueProviderProps extends ReactorQueueClientOptions { children?: ReactNode; } /** * Owns a single {@link ReactorQueueClient} for its subtree and mirrors its * state into a zustand store. Connects on mount (unless `autoConnect={false}`) * and tears down on unmount. * * ```tsx * * * * ``` */ declare function ReactorQueueProvider({ children, ...options }: ReactorQueueProviderProps): react.FunctionComponentElement>; /** Full queue state plus the stable action surface. */ declare function useReactorQueue(): QueueState & QueueActions; /** * Subscribe to a slice of queue state to minimize re-renders. * * ```ts * const position = useQueueSelector((s) => s.position); * ``` */ declare function useQueueSelector(selector: (state: QueueState) => T): T; /** Stable actions without subscribing to state (won't re-render on state change). */ declare function useQueueActions(): QueueActions; /** Escape hatch: the underlying client instance. */ declare function useReactorQueueClient(): ReactorQueueClient; export { type QueueActions, QueueState, ReactorQueueClient, ReactorQueueClientOptions, ReactorQueueProvider, type ReactorQueueProviderProps, useQueueActions, useQueueSelector, useReactorQueue, useReactorQueueClient };