/// <reference types="react" />
import { FlowStepSequence } from "@appglue/common/dist/Flow/Structure/FlowStepSequence";
import { FlowStepData } from "@appglue/common/dist/Flow/Steps/FlowStepData";
import { FlowConfiguration } from "@appglue/common/dist/Flow/FlowConfiguration";
import { IContextForControl } from "@appglue/common/dist/Common/IContextForControl";
import { IDraggingElementType } from "./Builder/Common/IDraggingElementType";
import { FlowBuilder } from "./FlowBuilder";
import { CandidateSequence } from "@appglue/common/dist/Flow/Structure/CandidateSequence";
import { IFlowStepSequence } from "@appglue/common/dist/Flow/Structure/IFlowStepSequence";
import { FlowStepOutputInstructions, FlowStepOutputInstructionType } from "@appglue/common/dist/Flow/Structure/FlowStepOutputInstructions";
import { HTMLShapeGeometry } from "../CommonUI/HTMLUtilities";
import { IContext } from "@appglue/common/dist/Common/IContext";
import { DataDefinition } from "@appglue/common/dist/Common/Data/DataDefinition";
import { FlowBuilderPage } from "./Builder/FlowBuilderPage";
import { IFlowDialog } from "./Builder/IFlowDialog";
import { IPosition } from "./Builder/Common/IPosition";
import { IColorElemContext, IColorPickerDialog } from "../CommonUI/BuilderUI/ColorPicker";
import { FlowExtraConnection } from "@appglue/common/dist/Flow/Structure/FlowExtraConnection";
import { BaseFlowStepEditor } from "./Steps/BaseFlowStepEditor";
import { ILine } from "./Structure/DisplayBehavior/ILine";
import { FlowConnection } from "@appglue/common/dist/Flow/Structure/FlowConnection";
interface IDraggingControl {
    destination?: string;
    source: {
        parent?: string;
        current: string;
    };
    pos: IPosition;
}
export declare class FlowEditContext implements IContext, IColorElemContext {
    static CONNECTIONS_CHANGED: string;
    static IS_SHOW_EDITOR: string;
    static DESIGNER_SCROLL_TOP: string;
    static CONTEXT_CONTROl: string;
    static SHOW_ERROR_BRANCH: string;
    static SELECTION_ELEMENT: string;
    static SELECTED_SEQUENCE_FOR_ERROR: string;
    static IS_SHOW_ERROR_BRANCH: string;
    static SHOW_ERROR_OR_END_CONNECTIONS: string;
    static NOTIFICATION: string;
    static SHOW_STEP_STRATEGY: string;
    static SELECTED_FOR_COLOR: string;
    static FLOW_NAME: string;
    static IS_SHOW_DESCRIPTION: string;
    static IS_COLLAPSED: string;
    static MODE: string;
    static DRAGGING_CONTROL: string;
    static DRAG_OVER_SEQUENCE: string;
    static CLIPBOARD_ELEMENT: string;
    static SHOW_SEQUENCE_STRATEGY: string;
    private static FLOW_CONTEXT_LISTENER_NAME;
    onFlowSave?: () => void;
    onFlowCancel?: () => void;
    flowEditor?: FlowBuilder;
    flow: FlowConfiguration;
    flowName?: string;
    viewAPIUrl?: string;
    flowStartDataDefinition: DataDefinition;
    mode: FlowBuilderPage;
    isShowEditor: boolean;
    readonly candidateWidth: number;
    readonly candidateHeight: number;
    readonly candidateDraggingWidth: number;
    readonly candidateDraggingHeight: number;
    readonly candidatePadding: string;
    readonly candidateFontSize: number;
    readonly sequenceCandidateShift: number;
    readonly pathCandidateShift: number;
    readonly collapsedWidth: number;
    readonly collapsedHeight: number;
    readonly errorCollapsedWidth: number;
    readonly stackWidth: number;
    readonly stackHeight: number;
    private stepEditors;
    constructor(flow: FlowConfiguration, flowEditor?: FlowBuilder);
    private _selectedForColor;
    get selectedForColor(): IColorPickerDialog | undefined;
    set selectedForColor(sel: IColorPickerDialog | undefined);
    private _selectedSequenceForError;
    get selectedSequenceForError(): IFlowEditSequenceDialog | null;
    set selectedSequenceForError(s: IFlowEditSequenceDialog | null);
    private _isShowErrorBranch;
    get isShowErrorBranch(): boolean;
    set isShowErrorBranch(show: boolean);
    private _isShowDescription;
    get isShowDescription(): boolean;
    set isShowDescription(show: boolean);
    private _selectedSequenceStrategy;
    get selectedSequenceStrategy(): IFlowEditSequenceDialog | null;
    set selectedSequenceStrategy(s: IFlowEditSequenceDialog | null);
    private _selectedStepStrategy;
    get selectedStepStrategy(): IFlowEditStepStrategy | null;
    set selectedStepStrategy(s: IFlowEditStepStrategy | null);
    private _clipboardElement?;
    get clipboardElement(): FlowStepData | FlowStepSequence | undefined;
    set clipboardElement(elem: FlowStepData | FlowStepSequence | undefined);
    private _contextControl;
    get contextControl(): IContextForControl | null;
    set contextControl(control: IContextForControl | null);
    private _notification?;
    get notification(): IFlowDialog | undefined;
    set notification(n: IFlowDialog | undefined);
    private _draggingElemType?;
    get draggingElemType(): IDraggingElementType | undefined;
    set draggingElemType(type: IDraggingElementType | undefined);
    private _selectionElement?;
    get selectionElement(): FlowConfiguration | FlowStepData | FlowStepSequence | undefined;
    private _lastSelectionElement?;
    get lastSelectionElement(): FlowConfiguration | FlowStepData | FlowStepSequence | undefined;
    private _dragOverSequenceId;
    get dragOverSequenceId(): string | undefined;
    private _draggingControl;
    get draggingControl(): IDraggingControl | null;
    set draggingControl(con: IDraggingControl | null);
    private _showErrorOrEndConnections;
    get showErrorOrEndConnections(): FlowStepOutputInstructionType | null;
    set showErrorOrEndConnections(isShow: FlowStepOutputInstructionType | null);
    private _isCollapsed;
    get isCollapsed(): boolean;
    set isCollapsed(show: boolean);
    private _designerScrollTop;
    get designerScrollTop(): number;
    set designerScrollTop(top: number);
    set dragOverSequence(sequence: FlowStepSequence | null);
    get selection(): string | undefined;
    getLine(value: FlowConnection): ILine;
    getLines(): ILine[];
    listenToSequences(): void;
    flowChanged(properties: string[] | undefined): void;
    flowSequenceChanged(_sequence: FlowStepSequence, properties: string[] | undefined): void;
    getOrCreateStepEditor(type: string, data?: FlowStepData): BaseFlowStepEditor;
    getStepEditor(id: string): BaseFlowStepEditor | undefined;
    registerStepEditor(_id: string, control: BaseFlowStepEditor): void;
    onStepMoved(fromSequence: IFlowStepSequence, toSequence: IFlowStepSequence, step: FlowStepData): void;
    renderEditUI(editContext: FlowEditContext, elem: FlowConfiguration | FlowStepData | FlowStepSequence | undefined): JSX.Element | null;
    getSequenceWidth(sequence: FlowStepSequence): number;
    getSequenceY(sequence: FlowStepSequence): number;
    geometryForElementById(id: string): HTMLShapeGeometry | undefined;
    designerGeometry(): HTMLShapeGeometry | undefined;
    refreshSequences(): void;
    refreshLines(): void;
    getCandidateSequences(): IFlowStepSequence[];
    getSequenceByXY(x: number, y: number): FlowStepSequence | null;
    purgeCandidateSequences(): void;
    getErrorSeqeuenceMainSize(sequence: FlowStepSequence): {
        width: number;
        height: number | undefined;
        fontSize: number;
        title: {
            color: string;
        };
    };
    getEndSequenceMainSize(sequence: FlowStepSequence): {
        width: number;
        height: number | undefined;
    };
    getPrimaryMainSize(sequence: FlowStepSequence): {
        width: number;
        height: number | undefined;
    };
    getSequenceMainSize(sequence: FlowStepSequence): {
        width: number;
        height: number | undefined;
    };
    positionCandidateSequences(requirePurge?: boolean): boolean;
    isDragOver(id: string): boolean;
    canCombine(combine: IFlowStepSequence, withSequence: IFlowStepSequence): boolean;
    combineSequences(combine: IFlowStepSequence, withSequence: IFlowStepSequence): void;
    onCopy(selectedId?: string): void;
    onCut(selectedId?: string): void;
    deleteSequence(idx: number): void;
    onDelete(selectedId?: string): void;
    onPaste(): void;
    setSelection(selection: FlowConfiguration | FlowStepData | FlowStepSequence): void;
    clearSelection(): void;
    addStepToCandidate(step: FlowStepData, candidate: CandidateSequence): void;
    moveStepToCandidate(step: FlowStepData, sequence: FlowStepSequence, candidate: CandidateSequence): void;
    toggleEditLayer(): void;
    hideEditLayer(): void;
    showEditLayer(): void;
    refresh(): void;
    setSelectedStepStrategy(elem: HTMLElement, step: FlowStepData): void;
    setSelectedSequenceStrategy(elem: HTMLElement, sequence: FlowStepSequence): void;
    getEndFlowConnections(): FlowExtraConnection[];
    getErrorFlowConnections(): FlowExtraConnection[];
    setSelectedSequenceForError(elem: HTMLElement, sequence: FlowStepSequence): void;
    setSelectedForColor(sequence: FlowStepSequence, element: HTMLElement): void;
    isDraggingOverSequence(sequence: FlowStepSequence): boolean;
    setCandidateDesiredPositionForSeqeuence(sequence: FlowStepSequence): void;
    getCandidateCommonStyles(): {
        width: number;
        height: number;
        padding: string;
        fontSize: number;
        dragging: {
            width: number;
            height: number;
        };
    };
    setCandidateDesiredPositionForSequenceStrategy(inst: FlowStepOutputInstructions): void;
    setCandidateDesiredPositionForStepStrategy(inst: FlowStepOutputInstructions): void;
    getSequenceExtraSize(sequence: FlowStepSequence): {
        width: number;
        height: number;
    };
    private delayPosition;
    private syncCandidates;
    private cloneFlowElement;
}
interface IFlowEditStepStrategy {
    position: {
        x: number;
        y: number;
    };
    step: FlowStepData;
}
interface IFlowEditSequenceDialog {
    position: {
        x: number;
        y: number;
    };
    sequence: FlowStepSequence;
}
export {};
