import { EventEmitter, captureRejectionSymbol } from 'node:events';
import type { ConnectionStatus } from '../adapters';
import type { EventName, EventCallbackResult } from './buses';
/**
 * Describes the events and their callbacks for a KyooConnection instance
 */
export interface KyooConnectionToApplicationEventEmitterEventCallbacks {
    /**
     * Called in case a promise rejection happens when emitting an event
     * @event
     * @param err The error that was thrown
     * @param event The event which caused the error
     * @param args The arguments that were passed to the event
     */
    [captureRejectionSymbol]: (err: Error, event: EventName, ...args: any[]) => EventCallbackResult;
    /**
     * Called when the connection status changes
     * @event
     * @param status The new connection status
     */
    'connectionStatusChanged': (status: ConnectionStatus) => EventCallbackResult;
    /**
     * Called when the connection is established
     * @event
     */
    'connected': () => EventCallbackResult;
    /**
     * Called when the connection is disconnected
     * @event
     */
    'disconnected': () => EventCallbackResult;
    /**
     * Called when the connection is in the process of connecting but not yet established
     * @event
     */
    'connecting': () => EventCallbackResult;
    /**
     * Called when an "emerg" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.emerg': (...args: any[]) => EventCallbackResult;
    /**
     * Called when an "alert" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.alert': (...args: any[]) => EventCallbackResult;
    /**
     * Called when a "crit" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.crit': (...args: any[]) => EventCallbackResult;
    /**
     * Called when an "error" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.error': (...args: any[]) => EventCallbackResult;
    /**
     * Called when a "warning" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.warning': (...args: any[]) => EventCallbackResult;
    /**
     * Called when a "notice" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.notice': (...args: any[]) => EventCallbackResult;
    /**
     * Called when an "info" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.info': (...args: any[]) => EventCallbackResult;
    /**
     * Called when a "debug" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.debug': (...args: any[]) => EventCallbackResult;
    /**
     * Called when a "trace" level log is emitted
     * @event
     * @param args The arguments which were passed to the event
     */
    'log.trace': (...args: any[]) => EventCallbackResult;
}
/**
 * @private
 */
export type KyooConnectionToApplicationEventEmitterEvent = keyof KyooConnectionToApplicationEventEmitterEventCallbacks;
/**
 * @private
 */
export type KyooConnectionToApplicationEventEmitterEventEmitterEventMap = {
    [K in KyooConnectionToApplicationEventEmitterEvent]: Parameters<KyooConnectionToApplicationEventEmitterEventCallbacks[K]>;
};
/**
 * @private
 */
export type KyooConnectionToApplicationEventEmitterKey = keyof KyooConnectionToApplicationEventEmitterEventCallbacks;
/**
 * @private
 */
export type KyooConnectionToApplicationEventEmitterListener<K extends KyooConnectionToApplicationEventEmitterKey> = K extends keyof KyooConnectionToApplicationEventEmitterEventCallbacks ? KyooConnectionToApplicationEventEmitterEventEmitterEventMap[K] extends unknown[] ? (...args: KyooConnectionToApplicationEventEmitterEventEmitterEventMap[K]) => EventCallbackResult : never : never;
/**
 * @private
 */
export declare class KyooConnectionToApplicationEventEmitter extends EventEmitter<KyooConnectionToApplicationEventEmitterEventEmitterEventMap> {
    constructor();
}
