import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, INPUT_METHOD } from './enums';
import type { UIAEP, TrackAEP, OperationalAEP, SELECTION_TYPE } from './utils';
export type BlockMenuOpenedAEP = UIAEP<ACTION.OPENED, ACTION_SUBJECT.BLOCK_MENU, undefined, {
    inputMethod: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
}, undefined>;
export type BlockMenuItemClickedAEP = UIAEP<ACTION.CLICKED, ACTION_SUBJECT.BLOCK_MENU_ITEM, undefined, {
    menuItemName: string;
}, undefined>;
interface ElementConvertedAttr {
    conversionSource?: string;
    eventCategory?: 'blockNodeInserted' | 'listInserted' | 'listConverted' | 'textFormatted';
    from: string;
    inputMethod: INPUT_METHOD.BLOCK_MENU;
    to: string;
    triggeredFrom: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
}
type ElementConvertedAEP = TrackAEP<ACTION.CONVERTED, ACTION_SUBJECT.ELEMENT, undefined, ElementConvertedAttr, undefined>;
type SelectionJson = {
    anchor?: number;
    head?: number;
    pos?: number;
    type: SELECTION_TYPE;
};
interface ElementTransformErrorAttr {
    docSize: number;
    error: string;
    errorStack?: string;
    from: string;
    inputMethod: INPUT_METHOD.BLOCK_MENU;
    selection: SelectionJson;
    to: string;
    triggeredFrom?: INPUT_METHOD.MOUSE | INPUT_METHOD.KEYBOARD;
}
export type ElementTransformErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.ELEMENT, ACTION_SUBJECT_ID.TRANSFORM, ElementTransformErrorAttr>;
interface ElementTransformAttr {
    duration: number;
    inputMethod: INPUT_METHOD.BLOCK_MENU;
    isEmptyLine: boolean;
    isNested: boolean;
    isSuggested?: boolean;
    outputNodesCount: number;
    sourceNodesCount: number;
    sourceNodesCountByType: Record<string, number>;
    sourceNodeType: string;
    startTime: number;
    targetNodeType: string;
}
export type ElementTransformAEP = TrackAEP<ACTION.TRANSFORMED, ACTION_SUBJECT.ELEMENT, undefined, ElementTransformAttr, undefined>;
export type BlockMenuEventPayload = BlockMenuOpenedAEP | BlockMenuItemClickedAEP | ElementConvertedAEP | ElementTransformErrorAEP | ElementTransformAEP;
export {};
