import { ElementRef, EventEmitter, OnInit } from '@angular/core';
import { Connection, ConnectionPoint, Node as WFNode, ToolType, SwimlaneItem } from '../workflow-designer.types';
import { WorkflowDesignerState } from '../workflow-designer.state';
import { WorkflowStage } from '../../../models/WorkflowStage';
import { Form } from '../../../models/Form';
import { Workflow } from '../../../models/Workflow';
import { WorkflowDataService } from '../workflow-data.service';
import * as i0 from "@angular/core";
export declare class DesignerCanvasComponent implements OnInit {
    state: WorkflowDesignerState;
    private dataService;
    selectedTool: ToolType;
    clickedPosition: EventEmitter<{
        x: number;
        y: number;
    }>;
    subflowSelected: EventEmitter<any>;
    pendingStagePosition: {
        swimlaneIndex: number;
        x: number;
        y: number;
    } | null;
    showStageDialog: EventEmitter<{
        position: any;
        isFromConnection: boolean;
        isFromDecision?: boolean;
        nodeId: string;
    }>;
    stagePropertiesUpdated: EventEmitter<{
        nodeId: string;
        stageData: Partial<WorkflowStage>;
    }>;
    canvasRef: ElementRef<SVGElement>;
    onWindowMouseUp(event: MouseEvent): void;
    canvasWidth: number;
    canvasHeight: number;
    gridSize: number;
    swimlaneHeight: number;
    visibleConnectionPointsNodeId: string | null;
    popupVisible: boolean;
    popupX: number;
    popupY: number;
    allowedNodeTypes: string[];
    showStartNodeFormPopup: boolean;
    startNodeFormsList: Form[];
    isLoadingStartNodeForms: boolean;
    startNodeFormPopupX: number;
    startNodeFormPopupY: number;
    showSubflowPopup: boolean;
    workflowsList: Workflow[];
    isLoadingWorkflows: boolean;
    subflowPopupX: number;
    subflowPopupY: number;
    pendingSubflowPosition: {
        swimlaneIndex: number;
        x: number;
        y: number;
    } | null;
    pendingDecisionConnection: {
        decisionNodeId: string;
        swimlaneIndex: number;
        x: number;
        y: number;
    } | null;
    pendingConnectionSourcePoint: ConnectionPoint | null;
    pendingConnectionSourceSwimlaneIndex: number | null;
    showDecisionConditionDialog: boolean;
    showConditionsDialog: boolean;
    activeDecisionNodeId: string;
    activeConnectionId: string;
    decisionConditionPopupX: number;
    decisionConditionPopupY: number;
    isCreatingStageFromDecision: boolean;
    pendingDecisionCondition: string;
    activeStageId: string | null;
    showStageDialogLocal: boolean;
    activeStageData: Partial<WorkflowStage>;
    potentialTargetPointId: string | null;
    constructor(state: WorkflowDesignerState, dataService: WorkflowDataService);
    ngOnInit(): void;
    onCanvasClick(event: MouseEvent): void;
    onShowShieldDialog(stageId: string): void;
    onStageDialogClosed(): void;
    onStageDialogSaved(stageData: Partial<WorkflowStage>): void;
    updateCanvasSize(): void;
    private getMousePosition;
    showConnectionPoints(nodeId: string, swimlaneIndex: number): void;
    isMouseOverNode(event: MouseEvent, node: WFNode, swimlaneIndex: number): boolean;
    getNodeBoundsWithPadding(node: WFNode, swimlaneIndex: number): {
        x: number;
        y: number;
        width: number;
        height: number;
    };
    hideConnectionPoints(nodeId: string): void;
    isConnectionPointVisible(nodeId: string): boolean;
    startConnectionDrag(event: MouseEvent, point: ConnectionPoint, swimlaneIndex: number): void;
    highlightPotentialTargets(event: MouseEvent): void;
    onMouseMove: (event: MouseEvent) => void;
    updateConnectionDrag(currentX: number, currentY: number): void;
    onMouseUp: (event: MouseEvent) => void;
    findConnectionPointAtPosition(x: number, y: number, tolerance?: number): {
        point: ConnectionPoint;
        nodeId: string;
        swimlaneIndex: number;
    } | null;
    isPositionInsideSwimlane(y: number): boolean;
    showConnectionPopup(x: number, y: number): void;
    hideConnectionPopup(): void;
    onDocumentClick(event: MouseEvent): void;
    createNodeConnection(nodeType: string): void;
    onDecisionConditionSaved(event: {
        connectionId: string;
        condition: string;
    }): void;
    onDecisionConditionCancelled(): void;
    getConnectionPath(): string;
    getConnectionPathForSavedConnection(connection: Connection): string;
    getOrthogonalPath(startX: number, startY: number, endX: number, endY: number, pointType: 'top' | 'right' | 'bottom' | 'left'): string;
    onStagePropertiesUpdated(event: {
        nodeId: string;
        stageData: Partial<WorkflowStage>;
    }): void;
    onConnectionCreated(connection: Connection): void;
    updateNodeConnections(node: WFNode): void;
    onEditSwimlane(event: MouseEvent, swimlane: SwimlaneItem, swimlaneIndex: number): void;
    toggleStartNodeFormPopup(event: MouseEvent, nodeX: number, nodeY: number, swimlaneIndex: number): void;
    selectStartNodeForm(form: Form | null): void;
    showSubflowSelectionPopup(x: number, y: number, swimlaneIndex: number): void;
    selectSubflowWorkflow(workflow: Workflow): void;
    showDecisionConditionsPopup(event: MouseEvent, node: WFNode, swimlaneIndex: number): void;
    ensureSwimlaneInView(swimlaneIndex: number): void;
    getLabelPosition(connection: Connection): {
        x: number;
        y: number;
    };
    saveConnectionLabel(connection: Connection, label: string): void;
    static ɵfac: i0.ɵɵFactoryDeclaration<DesignerCanvasComponent, never>;
    static ɵcmp: i0.ɵɵComponentDeclaration<DesignerCanvasComponent, "lib-designer-canvas", never, { "selectedTool": { "alias": "selectedTool"; "required": false; }; }, { "clickedPosition": "clickedPosition"; "subflowSelected": "subflowSelected"; "showStageDialog": "showStageDialog"; "stagePropertiesUpdated": "stagePropertiesUpdated"; }, never, never, false, never>;
}
