import * as React from "react";
import type { Datum } from "../shared/datumTypes";
import type { BaseChartProps, ChartAccessor } from "../shared/types";
import type { RealtimeFrameHandle } from "../../realtime/types";
import type { StreamNetworkFrameProps, ParticleStyle } from "../../stream/networkTypes";
import { type TooltipProp } from "../../Tooltip/Tooltip";
type TimeLike = number | Date | string;
export interface ProcessSankeyTick {
    date: TimeLike;
    label: string;
}
export interface ProcessSankeyProps<TNode extends Datum = Datum, TEdge extends Datum = Datum> extends BaseChartProps {
    nodes?: TNode[];
    edges?: TEdge[];
    /** [tStart, tEnd] of the chart's x-axis. Required. */
    domain: [TimeLike, TimeLike];
    /** Optional axis ticks. Each tick: { date, label }. */
    axisTicks?: ProcessSankeyTick[];
    nodeIdAccessor?: ChartAccessor<TNode, string>;
    sourceAccessor?: ChartAccessor<TEdge, string>;
    targetAccessor?: ChartAccessor<TEdge, string>;
    valueAccessor?: ChartAccessor<TEdge, number>;
    startTimeAccessor?: ChartAccessor<TEdge, TimeLike>;
    endTimeAccessor?: ChartAccessor<TEdge, TimeLike>;
    /**
     * Optional accessor for the per-edge "system in" time — when
     * `value` is added to the SOURCE node's mass. Use when the
     * source node has an intake event distinct from when this edge
     * departs (e.g. a patient is admitted to the ER at 7pm and
     * transferred out at 9pm — the ER node carries the patient's
     * weight between 7pm and 9pm). Without this, the source node's
     * mass is synthesized as a flat baseline and the band reads as
     * "always there." Set it and the node band climbs / falls as
     * units arrive and depart — a true staircase profile.
     */
    systemInTimeAccessor?: ChartAccessor<TEdge, TimeLike>;
    /**
     * Optional accessor for the per-edge "system out" time — when
     * `value` is removed from the TARGET node's mass. Mirror of
     * `systemInTimeAccessor` for the inbound side.
     */
    systemOutTimeAccessor?: ChartAccessor<TEdge, TimeLike>;
    /**
     * Accessor for a node's explicit lifetime extent — a `[start, end]`
     * tuple of time-likes. Lane spans
     * `min(xExtent[0], earliestEdge)` to `max(xExtent[1], latestEdge)`.
     */
    xExtentAccessor?: ChartAccessor<TNode, [TimeLike, TimeLike]>;
    edgeIdAccessor?: ChartAccessor<TEdge, string>;
    colorBy?: ChartAccessor<TNode, string>;
    colorScheme?: string | string[];
    /** Show a swatch + label legend. Defaults to `true` when `colorBy` is set. */
    showLegend?: boolean;
    /** Legend position. Default `"right"`. */
    legendPosition?: "right" | "left" | "top" | "bottom";
    /**
     * Format function for time values — applied to axis tick labels and
     * to time fields in the default tooltip. Same convention as
     * `xFormat` on XY charts.
     */
    timeFormat?: (d: number | Date) => string | React.ReactNode;
    /** Format function for the `value` field. Mirrors `yFormat` on XY charts. */
    valueFormat?: (d: number) => string | React.ReactNode;
    pairing?: "value" | "temporal";
    packing?: "off" | "reuse";
    laneOrder?: "insertion" | "crossing-min" | "inside-out" | "crossing-min+inside-out";
    ribbonLane?: "source" | "target" | "both";
    lifetimeMode?: "full" | "half";
    showLaneRails?: boolean;
    showQualityReadout?: boolean;
    /** Render the per-band node id label at the band's left edge.
     *  Default `true`. Set `false` for dense layouts where labels
     *  would overlap, or when the legend already names every band. */
    showLabels?: boolean;
    edgeOpacity?: number;
    /** Tooltip content. `false` disables, `true` uses the default,
     *  or pass a `Tooltip(...)` / custom function for full control. */
    tooltip?: TooltipProp;
    enableHover?: boolean;
    onClick?: (datum: Datum, position?: {
        x: number;
        y: number;
    }) => void;
    showParticles?: boolean;
    /** Style config for the particle overlay — same shape
     *  StreamNetworkFrame consumes from SankeyDiagram. Defaults
     *  (radius 3, opacity 0.7, spawnRate 0.1, maxPerEdge 50) live in
     *  `DEFAULT_PARTICLE_STYLE`. */
    particleStyle?: ParticleStyle;
    /** Pass-through to the underlying StreamNetworkFrame. */
    frameProps?: Partial<Omit<StreamNetworkFrameProps, "nodes" | "edges" | "chartType" | "size" | "customNetworkLayout" | "layoutConfig">>;
}
/**
 * ProcessSankey — temporal flow between nodes with an actual time x-axis.
 *
 * Built on top of `StreamNetworkFrame` via the `customNetworkLayout`
 * escape hatch. Bands and ribbons emit as `bezier` scene-edges; the
 * Frame handles canvas painting, hit testing, accessibility, theme
 * cascade, and the push API.
 *
 * **Differs from SankeyDiagram in three ways:**
 *
 * 1. **Edges carry time.** Each edge has `startTime` / `endTime`.
 * 2. **Nodes have lifetimes, not ranks.** A node's vertical lane spans
 *    `min(xExtent[0], earliestEdge)` to `max(xExtent[1], latestEdge)`.
 * 3. **Static-graph cycles are valid** as long as edges move forward in time.
 *
 * @example
 * ```tsx
 * // Static fixture: pre-built nodes + timed edges, categorical colors.
 * <ProcessSankey
 *   nodes={[
 *     { id: "Alice", category: "Person", xExtent: ["2026-01-06", "2026-01-06"] },
 *     { id: "Bob",   category: "Person", xExtent: ["2026-02-01", "2026-02-01"] },
 *     { id: "Eng",     category: "Team" },
 *     { id: "Release", category: "Milestone", xExtent: ["2026-04-15", "2026-05-30"] },
 *   ]}
 *   edges={[
 *     { id: "alice-eng", source: "Alice", target: "Eng",     value: 8,
 *       startTime: "2026-01-20", endTime: "2026-02-10" },
 *     { id: "bob-eng",   source: "Bob",   target: "Eng",     value: 5,
 *       startTime: "2026-02-15", endTime: "2026-03-15" },
 *     { id: "eng-rel",   source: "Eng",   target: "Release", value: 13,
 *       startTime: "2026-04-15", endTime: "2026-05-15" },
 *   ]}
 *   domain={["2026-01-01", "2026-05-31"]}
 *   colorBy="category"
 *   showLegend
 * />
 * ```
 *
 * @example
 * ```tsx
 * // Push mode: omit `edges`, mutate via the ref. Same chart shape, but
 * // edges arrive over time. Particles depict throughput.
 * const ref = useRef<RealtimeFrameHandle>(null)
 *
 * useEffect(() => {
 *   const id = setInterval(() => {
 *     ref.current?.push({
 *       source: "API", target: "DB", value: Math.random() * 10,
 *       startTime: Date.now(), endTime: Date.now() + 1500,
 *     })
 *   }, 800)
 *   return () => clearInterval(id)
 * }, [])
 *
 * return (
 *   <ProcessSankey
 *     ref={ref}
 *     domain={[t0, t0 + 60_000]}
 *     showParticles
 *     colorBy="category"
 *     showLegend
 *   />
 * )
 * ```
 */
export declare const ProcessSankey: {
    <TNode extends Datum = Datum, TEdge extends Datum = Datum>(props: ProcessSankeyProps<TNode, TEdge> & React.RefAttributes<RealtimeFrameHandle>): React.ReactElement | null;
    displayName?: string;
};
export default ProcessSankey;
