import type Block from "../core/block.js";
import type Editor from "../core/editor.js";
import type { Player } from "../types.js";
export declare const EdenEvents: {
    readonly activeBlockChanged: "eden-active-block-changed";
    readonly blockContentChanged: "eden-block-content-changed";
    readonly blockCreated: "eden-block-created";
    readonly blockPasted: "eden-block-pasted";
    readonly blockRemoved: "eden-block-removed";
    readonly contentSaved: "eden-content-saved";
    readonly playersUpdated: "eden-players-updated";
    readonly textFormatted: "eden-text-formatted";
    readonly textFormatedLegacy: "eden-text-formated";
    readonly structureNodeClicked: "eden-structure-node-clicked";
    readonly structureNodeDoubleClicked: "eden-structure-node-double-clicked";
    readonly structureOverredNodeChanged: "eden-structure-overred-node-changed";
    readonly structureDraggedNodeChanged: "eden-structure-dragged-node-changed";
    readonly structureDropChanged: "eden-structure-drop-changed";
    readonly structureDragEnd: "eden-structure-drag-end";
};
export type EdenEventName = (typeof EdenEvents)[keyof typeof EdenEvents];
export interface EdenEventPayloadMap {
    [EdenEvents.activeBlockChanged]: {
        block: Block | undefined;
    };
    [EdenEvents.blockContentChanged]: {
        block: Block;
        content: string;
    };
    [EdenEvents.blockCreated]: {
        block: Block;
        editor: Editor;
    };
    [EdenEvents.blockPasted]: {
        block: Block;
        editor: Editor;
    };
    [EdenEvents.blockRemoved]: {
        block: Block;
        editor: Editor;
    };
    [EdenEvents.contentSaved]: Record<string, never>;
    [EdenEvents.playersUpdated]: {
        players: Player[];
    };
    [EdenEvents.textFormatted]: Record<string, never>;
    [EdenEvents.textFormatedLegacy]: Record<string, never>;
    [EdenEvents.structureNodeClicked]: HTMLElement;
    [EdenEvents.structureNodeDoubleClicked]: HTMLElement;
    [EdenEvents.structureOverredNodeChanged]: HTMLElement;
    [EdenEvents.structureDraggedNodeChanged]: HTMLElement;
    [EdenEvents.structureDropChanged]: {
        position: string;
    };
    [EdenEvents.structureDragEnd]: HTMLElement;
}
type EdenEventDomain = Document | HTMLElement | Window;
export declare function addEdenEventListener<K extends EdenEventName>(domain: EdenEventDomain, name: K, callback: (event: CustomEvent<EdenEventPayloadMap[K]>) => void): void;
export declare function removeEdenEventListener<K extends EdenEventName>(domain: EdenEventDomain, name: K, callback: (event: CustomEvent<EdenEventPayloadMap[K]>) => void): void;
export declare function fireEvent<K extends EdenEventName>(domain: Document | HTMLElement, name: K, detail?: EdenEventPayloadMap[K]): void;
export declare function fireEvent<T>(domain: Document | HTMLElement, name: string, detail?: T): void;
export {};
//# sourceMappingURL=event.d.ts.map