import { Handler } from 'mitt';

declare type EditorEvents = {
    ready: string;
    update: string;
};

export declare interface EditorOptions {
    defaultLateX: string | null;
    class: string | string[];
}

export declare class MathEditor {
    private readonly container;
    private options;
    private child;
    private iframeSrc;
    private emitter;
    constructor(container: HTMLElement, iframeSrc: string, options?: Partial<EditorOptions>);
    open(): Promise<void>;
    close(): void;
    get(): Promise<string>;
    set(laTeX: string): void;
    on<Key extends keyof EditorEvents>(type: Key, handler: Handler<EditorEvents[Key]>): void;
    off<Key extends keyof EditorEvents>(type: Key, handler?: Handler<EditorEvents[Key]>): void;
}

export { }
