import { color, record } from '@synnaxlabs/x';
import { z } from 'zod/v4';
import type * as rf from "@xyflow/react";
/**
 * The current viewport state of the diagram.
 */
export declare const viewportZ: z.ZodObject<{
    position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>;
    zoom: z.ZodNumber;
}, z.core.$strip>;
/**
 * The current viewport state of the diagram.
 */
export type Viewport = z.infer<typeof viewportZ>;
export declare const edgeZ: z.ZodObject<{
    key: z.ZodString;
    source: z.ZodString;
    target: z.ZodString;
    id: z.ZodString;
    data: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>>;
    selected: z.ZodBoolean;
    sourceHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
    targetHandle: z.ZodOptional<z.ZodNullable<z.ZodString>>;
}, z.core.$strip>;
/**
 * The properties for an edge within a diagram.
 */
export type Edge = z.infer<typeof edgeZ>;
/**
 * The properties for a node within a diagram.
 */
export declare const nodeZ: z.ZodObject<{
    key: z.ZodString;
    position: z.ZodObject<{
        x: z.ZodNumber;
        y: z.ZodNumber;
    }, z.core.$strip>;
    selected: z.ZodOptional<z.ZodBoolean>;
    zIndex: z.ZodOptional<z.ZodNumber>;
    type: z.ZodOptional<z.ZodString>;
    data: z.ZodOptional<z.ZodRecord<z.ZodUnion<readonly [z.ZodNumber, z.ZodString, z.ZodSymbol]>, z.ZodUnknown>>;
    measured: z.ZodOptional<z.ZodObject<{
        width: z.ZodOptional<z.ZodNumber>;
        height: z.ZodOptional<z.ZodNumber>;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * The properties for a node within a diagram.
 */
export type Node = z.infer<typeof nodeZ>;
/**
 * Translates nodes from their pluto representation to their react-flow representation.
 */
export declare const translateNodesForward: (nodes: Node[], dragHandleSelector?: string) => rf.Node[];
/** Translates edges from their pluto representation to their react-flow representation. */
export declare const translateEdgesForward: (edges: Edge[]) => Array<rf.Edge<record.Unknown>>;
/** Translates nodes from their react-flow representation to their pluto representation. */
export declare const translateNodesBackward: (nodes: rf.Node[]) => Node[];
/** Translates edges from their react-flow representation to their pluto representation */
export declare const translateEdgesBackward: (edges: Array<rf.Edge<record.Unknown>>, defaultColor: color.Crude) => Edge[];
/** Translates the diagram viewport from its pluto representation to its react-flow representation */
export declare const translateViewportForward: (viewport: Viewport) => rf.Viewport;
/** Translates the diagram viewport from its react-flow representation to its pluto representation */
export declare const translateViewportBackward: (viewport: rf.Viewport) => Viewport;
/**
 * Executes the provided callback against the react-flow representation of the given
 * nodes, then converts
 */
export declare const nodeConverter: (nodes: Node[], f: (nodes: rf.Node[]) => rf.Node[]) => Node[];
export declare const edgeConverter: (edges: Edge[], f: (edges: rf.Edge<record.Unknown>[]) => rf.Edge<record.Unknown>[], color: color.Crude) => Edge[];
//# sourceMappingURL=types.d.ts.map