import { color } from '@synnaxlabs/x';
import { z } from 'zod';
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>;
/**
 * Pluto specific info passed to the 'data' attribute on rf.Edge.
 */
export declare const rfEdgeDataZ: z.ZodObject<{
    color: z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, z.core.$strip>]>;
    variant: z.ZodOptional<z.ZodString>;
    segments: z.ZodArray<z.ZodObject<{
        direction: z.ZodEnum<{
            x: "x";
            y: "y";
        }>;
        length: z.ZodNumber;
    }, z.core.$strip>>;
}, z.core.$strip>;
/**
 * Pluto specific info passed to the 'data' attribute on rf.Edge.
 */
export type RFEdgeData = z.infer<typeof rfEdgeDataZ>;
export declare const edgeZ: z.ZodObject<{
    variant: z.ZodOptional<z.ZodString>;
    key: z.ZodString;
    source: z.ZodString;
    target: z.ZodString;
    segments: z.ZodArray<z.ZodObject<{
        direction: z.ZodEnum<{
            x: "x";
            y: "y";
        }>;
        length: z.ZodNumber;
    }, z.core.$strip>>;
    color: z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
        rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
    }, z.core.$strip>]>;
    id: z.ZodString;
    data: z.ZodOptional<z.ZodObject<{
        segments: z.ZodArray<z.ZodObject<{
            direction: z.ZodEnum<{
                x: "x";
                y: "y";
            }>;
            length: z.ZodNumber;
        }, z.core.$strip>>;
        color: z.ZodUnion<readonly [z.ZodString, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>, z.ZodObject<{
            rgba255: z.ZodTuple<[z.ZodNumber, z.ZodNumber, z.ZodNumber, z.ZodNumber], null>;
        }, z.core.$strip>]>;
        variant: z.ZodOptional<z.ZodString>;
    }, z.core.$strip>>;
    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<RFEdgeData>>;
/** 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<RFEdgeData>>, 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<RFEdgeData>[]) => rf.Edge<RFEdgeData>[], color: color.Crude) => Edge[];
//# sourceMappingURL=types.d.ts.map