import { type ReactElement, type ComponentPropsWithoutRef } from "react";
import { xy } from "@synnaxlabs/x";
import { Align } from '../../align';
import { Button } from '../../button';
import { type RenderProp } from '../../util/renderProp';
import { Viewport as CoreViewport } from '../../viewport';
import { type Edge, type Node, type Viewport } from './types';
export interface SymbolProps {
    symbolKey: string;
    position: xy.XY;
    selected: boolean;
}
export interface UseProps {
    allowEdit?: boolean;
    initialEdges: Edge[];
    initialNodes: Node[];
    initialViewport?: Viewport;
}
export declare const use: ({ initialNodes, initialEdges, allowEdit, initialViewport, }: UseProps) => UseReturn;
export interface UseReturn {
    edges: Edge[];
    nodes: Node[];
    onNodesChange: (nodes: Node[]) => void;
    onEdgesChange: (edges: Edge[]) => void;
    editable: boolean;
    onEditableChange: (v: boolean) => void;
    onViewportChange: (vp: Viewport) => void;
    viewport: Viewport;
}
export interface DiagramProps extends UseReturn, Omit<ComponentPropsWithoutRef<"div">, "onError"> {
    triggers?: CoreViewport.UseTriggers;
}
interface ContextValue {
    editable: boolean;
    onEditableChange: (v: boolean) => void;
    registerNodeRenderer: (renderer: RenderProp<SymbolProps>) => void;
}
export declare const useContext: () => ContextValue;
export interface NodeRendererProps {
    children: RenderProp<SymbolProps>;
}
export declare const NodeRenderer: import("react").MemoExoticComponent<({ children }: NodeRendererProps) => ReactElement | null>;
export declare const Background: () => ReactElement | null;
export interface ControlsProps extends Align.PackProps {
}
export declare const Controls: ({ children, ...props }: ControlsProps) => ReactElement;
export type ToggleEditControlProps = Omit<Button.ToggleIconProps, "value" | "onChange" | "children">;
export declare const ToggleEditControl: ({ onClick, ...props }: ToggleEditControlProps) => ReactElement;
export type FitViewControlProps = Omit<Button.IconProps, "children">;
export declare const FitViewControl: ({ onClick, ...props }: FitViewControlProps) => ReactElement;
export declare const Diagram: (props: DiagramProps) => ReactElement;
export {};
