import { default as CxBadge } from '../../../atoms/src/components/badge/badge.ts';
import { default as CxCard } from '../../../atoms/src/components/card/card.ts';
import { default as CxDivider } from '../../../atoms/src/components/divider/divider.ts';
import { default as CxDropdown } from '../../../atoms/src/components/dropdown/dropdown.ts';
import { default as CxIcon } from '../../../atoms/src/components/icon/icon.ts';
import { default as CxIconButton } from '../../../atoms/src/components/icon-button/icon-button.ts';
import { default as CxLineClamp } from '../../../atoms/src/components/line-clamp/line-clamp.ts';
import { default as CxMenu } from '../../../atoms/src/components/menu/menu.ts';
import { default as CxMenuItem } from '../../../atoms/src/components/menu-item/menu-item.ts';
import { default as CxSpinner } from '../../../atoms/src/components/spinner/spinner.ts';
import { default as CxTooltip } from '../../../atoms/src/components/tooltip/tooltip.ts';
import { default as CortexElement } from '../../../base/src/cortex-element.ts';
import { Edge, Node, Workflow } from '../../../types/src/graph-view';
import { default as React } from 'react';

export type CxGraphViewAddNodeParams = {
    sourceNode: string;
    targetNode?: string;
    transition?: string;
    type: string;
};
export type CxGraphViewPaneClickParams = {
    event: React.MouseEvent;
};
export type CxGraphViewSelectEdgeParams = {
    edges: Edge[];
};
export type CxGraphViewSelectNodeParams = {
    nodes: string[];
};
export type CxGraphViewAddNodeEvent = CustomEvent<CxGraphViewAddNodeParams>;
export type CxGraphViewPaneClickEvent = CustomEvent<CxGraphViewPaneClickParams>;
export type CxGraphViewSelectEdgeEvent = CustomEvent<CxGraphViewSelectEdgeParams>;
export type CxGraphViewSelectNodeEvent = CustomEvent<CxGraphViewSelectNodeParams>;
export type CxGraphViewUnlinkEvent = CustomEvent<Edge>;
export type CxActionDropdownEvent = CustomEvent<{
    id: string | unknown;
}>;
declare global {
    interface GlobalEventHandlersEventMap {
        'cx-action-dropdown-hide': CxActionDropdownEvent;
        'cx-action-dropdown-show': CxActionDropdownEvent;
        'cx-graph-view-add-node': CxGraphViewAddNodeEvent;
        'cx-graph-view-pane-click': CxGraphViewPaneClickEvent;
        'cx-graph-view-select-edge': CxGraphViewSelectEdgeEvent;
        'cx-graph-view-select-node': CxGraphViewSelectNodeEvent;
        'cx-graph-view-unlink': CxGraphViewUnlinkEvent;
    }
    interface HTMLElementTagNameMap {
        'cx-graph-view': CxGraphView;
    }
}
/**
 * @summary
 *
 * @event {{ id: string }} cx-action-dropdown-hide - Emitted when the action dropdown is hidden.
 * @event {{ id: string }} cx-action-dropdown-show - Emitted when the form control has been checked for validity and its constraints aren’t satisfied.
 * @event {{ sourceNode: string, targetNode?: string, transition?: string, type: string }} cx-graph-view-add-node - Emitted when selecting any item in the edge menu except the Unlink action.
 * @event {{ event: React.MouseEvent }} cx-graph-view-pane-click - Emitted when the pane is clicked.
 * @event {{ edges: { fromNode: string, toNode: string, fromTransition?: string }[] }} cx-graph-view-select-edge - Emitted when an edge is selected.
 * @event {{ nodes: string[] }} cx-graph-view-select-node - Emitted when a node is selected.
 * @event {{ fromNode: string, toNode: string, fromTransition?: string }} cx-graph-view-unlink - Emitted when selecting the Unlink action in the edge menu.
 */
export default class CxGraphView extends CortexElement {
    static readonly styles: import('lit').CSSResult[];
    static readonly dependencies: {
        'cx-badge': typeof CxBadge;
        'cx-card': typeof CxCard;
        'cx-divider': typeof CxDivider;
        'cx-dropdown': typeof CxDropdown;
        'cx-icon': typeof CxIcon;
        'cx-icon-button': typeof CxIconButton;
        'cx-line-clamp': typeof CxLineClamp;
        'cx-menu': typeof CxMenu;
        'cx-menu-item': typeof CxMenuItem;
        'cx-spinner': typeof CxSpinner;
        'cx-tooltip': typeof CxTooltip;
    };
    private readonly localize;
    data: Workflow;
    readonly: boolean;
    hideControls: boolean;
    renderDelay: number;
    constructor();
    selectNodesWhenLayout(_nodeIds?: string[]): void;
    selectNodes(_nodeIds?: string[]): void;
    handleAddNode(params: CxGraphViewAddNodeParams): void;
    handleSelectNode(params: CxGraphViewSelectNodeParams): void;
    handleSelectEdge(params: CxGraphViewSelectEdgeParams): void;
    handlePaneClick(params: CxGraphViewPaneClickParams): void;
    handleUnlink(params: Edge): void;
    addNodes(nodes: Node[] | Node): void;
    addEdges(edges: Edge[] | Edge): void;
    removeNodes(nodeId: string | string[]): void;
    removeEdges(link: Edge | Edge[]): void;
    updateNodeData(nodeId: string, data: Node): void;
    getData(): Workflow;
    render(): import('lit').TemplateResult<1>;
}
