import { Box } from "./boxes/Box";
import { PiBinaryExpression, PiElement, PiExpression } from "../language/PiModel";
import { PiCaret } from "../util/BehaviorUtils";
import { PiKey } from "../util/Keys";
import { PiEditor } from "./PiEditor";
export declare type PiTriggerType = string | RegExp | PiKey;
export declare function triggerToString(t: PiTriggerType): string;
export interface PiActions {
    expressionCreators: PiExpressionCreator[];
    binaryExpressionCreators: PiBinaryExpressionCreator[];
    customBehaviors: PiCustomBehavior[];
    keyboardActions: KeyboardShortcutBehavior[];
}
export interface PiBehavior {
    trigger: PiTriggerType;
    activeInBoxRoles: string[];
    isApplicable?: (box: Box) => boolean;
    boxRoleToSelect?: string;
    caretPosition?: PiCaret;
}
export interface PiExpressionCreator extends PiBehavior {
    expressionBuilder: (box: Box, trigger: PiTriggerType, editor: PiEditor, propertyName?: string) => PiExpression;
}
export interface PiBinaryExpressionCreator extends PiBehavior {
    expressionBuilder: (box: Box, trigger: PiTriggerType, editor: PiEditor, propertyName?: string) => PiBinaryExpression;
}
export interface PiCustomBehavior extends PiBehavior {
    action: (box: Box, trigger: string | RegExp, editor: PiEditor, propertyName?: string) => PiElement | null;
}
export interface KeyboardShortcutBehavior extends PiBehavior {
    trigger: PiKey;
    action: (box: Box, trigger: PiKey, editor: PiEditor, propertyName?: string) => Promise<PiElement>;
}
export declare function isRegExp(a: PiTriggerType): a is RegExp;
export declare function isProKey(a: PiTriggerType): a is PiKey;
export declare function isString(a: PiTriggerType): a is string;
//# sourceMappingURL=PiAction.d.ts.map