import { type Listener, type Receiver } from "./utils/event-emitter.js";
type MsgObj = {
    msg: string;
    [key: string]: unknown;
};
type ErrObj = {
    error: any;
    [key: string]: unknown;
};
type EventObj = {
    event: string;
    [key: string]: unknown;
};
export declare namespace Logger2 {
    type LogData = MsgObj;
    type WarnData = MsgObj;
    type ErrorData = ErrObj;
    type ActionData = MdEditorLogger.ActionData;
    type MetricsData = MdEditorLogger.MetricsData;
    type EventData = EventObj;
    type ReceiverDataMap = {
        log: LogData;
        warn: WarnData;
        error: ErrorData;
        event: EventData;
        action: ActionData;
        metrics: MetricsData;
    };
    interface LogReceiver extends Receiver<ReceiverDataMap> {
    }
    interface LogEmitter {
        /** Log a regular message */
        log(msg: string, ...data: object[]): void;
        /** Log a warning message */
        warn(msg: string, ...data: object[]): void;
        /** Log an error */
        error(err: string | Error | unknown, ...data: object[]): void;
        /** Log an event triggered in editor. For example, changing mode, pasting, or otherwise */
        event(data: Logger2.EventData): void;
        /** Log the action called in editor and its source (from toolbar, or hotkeys, etc.) */
        action(data: Logger2.ActionData): void;
        /** Log metric data, such as parsing or execution time */
        metrics(data: Logger2.MetricsData): void;
    }
    interface ILogger extends Logger2.LogEmitter, Logger2.LogReceiver {
        /** Create nested logger with bound parameters */
        nested(params: object): ILogger;
    }
}
export declare class Logger2 implements Logger2.ILogger {
    #private;
    log(msg: string, ...data: object[]): void;
    warn(msg: string, ...data: object[]): void;
    error(err: string | Error | unknown, ...data: object[]): void;
    action(data: Logger2.ActionData): void;
    metrics(data: Logger2.MetricsData): void;
    event(data: Logger2.EventData): void;
    nested(params: object): Logger2.ILogger;
    on<K extends keyof Logger2.ReceiverDataMap>(type: K, listener: Listener<Logger2.ReceiverDataMap[K]>): void;
    off<K extends keyof Logger2.ReceiverDataMap>(type: K, listener: Listener<Logger2.ReceiverDataMap[K]>): void;
}
declare global {
    /** @deprecated */
    namespace MdEditorLogger {
        /** @deprecated */
        type MetricsData = {
            component: string;
            event: string;
            duration?: number;
            meta?: Record<string, any>;
            [key: string]: any;
        };
        /** @deprecated */
        interface ActionData {
            action: string;
            source: string;
            [key: string]: any;
        }
        /** @deprecated */
        interface Logger {
            log(...data: any[]): void;
            info(...data: any[]): void;
            error(...data: any[]): void;
            warn(...data: any[]): void;
            metrics(data: MetricsData): void;
            action(data: ActionData): void;
        }
        /** @deprecated */
        interface Settings extends Partial<Logger> {
        }
    }
}
/** @deprecated */
declare class Logger implements MdEditorLogger.Logger {
    #private;
    get log(): (...data: any[]) => void;
    get info(): (...data: any[]) => void;
    get error(): (...data: any[]) => void;
    get warn(): (...data: any[]) => void;
    get metrics(): (data: MdEditorLogger.MetricsData) => void;
    get action(): (data: MdEditorLogger.ActionData) => void;
    setLogger(settings?: MdEditorLogger.Settings): void;
    /**
     * @inner
     *
     * To override the default logger, use setLogger
     */
    createLogger(settings: MdEditorLogger.Settings): MdEditorLogger.Logger;
}
/** @deprecated */
export declare const logger: Logger;
/**
 * Alias for global singleton logger instance
 *
 * @deprecated
 */
export declare const globalLogger: Logger;
export {};
