import type { DynamicClient } from '../../client/types';
import type { DynamicEvents, EmitEventParams, OffEventParams, OnEventParams, OnceEventParams } from './clientEvents.types';
/**
 * Adds an event listener for Dynamic client events.
 *
 * This function allows you to listen for various events emitted by the Dynamic client,
 * such as authentication state changes, wallet connections, and more.
 *
 * @param params.event - The event name to listen for.
 * @param params.listener - The callback function to execute when the event is fired.
 * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
 * @returns A function that can be called to remove the listener.
 * @notInstrumented
 * @hook Event listeners are error-prone to wire up by hand with useEffect.
 */
export declare const onEvent: <E extends keyof DynamicEvents>({ event, listener }: OnEventParams<E>, client?: DynamicClient) => () => void;
/**
 * Removes an event listener from Dynamic client events.
 *
 * This function unsubscribes a previously registered event listener
 * from the specified Dynamic client event.
 *
 * @param params.event - The event name to remove the listener from.
 * @param params.listener - The callback function to remove.
 * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
 * @notInstrumented
 */
export declare const offEvent: <E extends keyof DynamicEvents>({ event, listener }: OffEventParams<E>, client?: DynamicClient) => void;
/**
 * Adds a one-time event listener for Dynamic client events.
 *
 * This function listens for an event that will automatically remove itself
 * after being triggered once.
 *
 * @param params.event - The event name to listen for.
 * @param params.listener - The callback function to execute when the event is fired.
 * @param [client] - The Dynamic client instance. Only required when using multiple Dynamic clients.
 * @returns A function that can be called to remove the listener before it fires.
 * @notInstrumented
 * @hook Event listeners are error-prone to wire up by hand with useEffect.
 */
export declare const onceEvent: <E extends keyof DynamicEvents>({ event, listener }: OnceEventParams<E>, client?: DynamicClient) => () => void;
/**
 * Emits a Dynamic client event.
 *
 * This function triggers an event that will be received by all registered
 * listeners for the specified event type.
 *
 * @param params.event - The event name to emit.
 * @param params.args - The arguments to pass to event listeners.
 * @param client - The Dynamic client instance.
 * @notInstrumented
 */
export declare const emitEvent: <E extends keyof DynamicEvents>({ event, args }: EmitEventParams<E>, client: DynamicClient) => void;
//# sourceMappingURL=clientEvents.d.ts.map