
import { C as Run, Jt as ColumnLineageData, Kt as CllInput, Ot as RunsAggregated, Qt as GitInfo, Zt as CatalogMetadata, cn as SQLMeshInfo, on as NodeData, rn as ManifestMetadata, s as LineageDiffViewOptions, sn as PullRequestInfo, un as StateMetadata } from "./flag-CiR2E5oz.js";
import React from "react";
import { Edge, Node } from "@xyflow/react";

//#region src/contexts/lineage/types.d.ts

/**
 * Environment information derived from server info
 */
interface EnvInfo {
  stateMetadata?: StateMetadata;
  adapterType?: string;
  git?: GitInfo;
  pullRequest?: PullRequestInfo;
  dbt?: {
    base: ManifestMetadata | undefined | null;
    current: ManifestMetadata | undefined | null;
  };
  sqlmesh?: SQLMeshInfo | null;
}
/**
 * Which environment the node/edge comes from
 */
type LineageFrom = "both" | "base" | "current";
/**
 * Lineage graph node type for React Flow
 */
type LineageGraphNode = Node<{
  id: string;
  name: string;
  from: LineageFrom;
  data: {
    base?: NodeData;
    current?: NodeData;
  };
  changeStatus?: "added" | "removed" | "modified";
  change?: {
    category: "breaking" | "non_breaking" | "partial_breaking" | "unknown";
    columns: Record<string, "added" | "removed" | "modified"> | null;
  };
  resourceType?: string;
  packageName?: string;
  parents: Record<string, LineageGraphEdge>;
  children: Record<string, LineageGraphEdge>;
}, "lineageGraphNode">;
/**
 * Column-level lineage node type
 */
type LineageGraphColumnNode = Node<{
  node: LineageGraphNode["data"];
  column: string;
  type: string;
  transformationType?: string;
  changeStatus?: "added" | "removed" | "modified";
}, "lineageGraphColumnNode">;
/**
 * Lineage graph edge type for React Flow
 */
type LineageGraphEdge = Edge<{
  from: LineageFrom;
  changeStatus?: "added" | "removed";
}, "lineageGraphEdge">;
/**
 * Union type for all lineage graph node types
 */
type LineageGraphNodes = LineageGraphNode | LineageGraphColumnNode;
/**
 * The main lineage graph data structure
 */
interface LineageGraph {
  nodes: Record<string, LineageGraphNode>;
  edges: Record<string, LineageGraphEdge>;
  modifiedSet: string[];
  manifestMetadata: {
    base?: ManifestMetadata;
    current?: ManifestMetadata;
  };
  catalogMetadata: {
    base?: CatalogMetadata;
    current?: CatalogMetadata;
  };
}
/**
 * Type guard for LineageGraphNode
 */
declare function isLineageGraphNode(node: LineageGraphNodes): node is LineageGraphNode;
/**
 * Type guard for LineageGraphColumnNode
 */
declare function isLineageGraphColumnNode(node: LineageGraphNodes): node is LineageGraphColumnNode;
/**
 * Context value exposed by LineageGraphContext
 */
interface LineageGraphContextType {
  /** The processed lineage graph */
  lineageGraph?: LineageGraph;
  /** Environment metadata */
  envInfo?: EnvInfo;
  /** Whether in review mode (read-only checks) */
  reviewMode?: boolean;
  /** Whether in cloud mode (recce cloud) */
  cloudMode?: boolean;
  /** Whether in file mode (loading from file) */
  fileMode?: boolean;
  /** The state file name if in file mode */
  fileName?: string;
  /** Whether this is the demo site */
  isDemoSite: boolean;
  /** Whether running in GitHub Codespace */
  isCodespace?: boolean;
  /** Loading state */
  isLoading?: boolean;
  /** Error message if loading failed */
  error?: string;
  /** Supported task types from server */
  supportTasks?: Record<string, boolean>;
  /** Refetch the lineage graph data */
  retchLineageGraph?: () => void;
  /** Check if an action is available */
  isActionAvailable: (actionName: string) => boolean;
  /** Pre-aggregated run results by model */
  runsAggregated?: RunsAggregated;
  /** Refetch the aggregated runs */
  refetchRunsAggregated?: () => void;
}
/**
 * Action mode for node operations - single or multiple nodes
 */
type ActionMode = "per_node" | "multi_nodes";
/**
 * Select mode for multi-node selection
 */
type SelectMode = "selecting" | "action_result" | undefined;
/**
 * Action state for individual node operations
 */
interface NodeAction {
  /** Whether this is a per-node or multi-node action */
  mode: ActionMode;
  /** Current status of this node's action */
  status?: "pending" | "running" | "success" | "failure" | "skipped";
  /** Reason why this node was skipped (if applicable) */
  skipReason?: string;
  /** The run associated with this action */
  run?: Run;
}
/**
 * Overall action state for batch operations
 */
interface ActionState {
  /** Whether this is a per-node or multi-node action */
  mode: ActionMode;
  /** Overall status of the action batch */
  status: "pending" | "running" | "canceling" | "canceled" | "completed";
  /** Current run being executed */
  currentRun?: Partial<Run>;
  /** Number of completed actions */
  completed: number;
  /** Total number of actions */
  total: number;
  /** Per-node action state */
  actions: Record<string, NodeAction>;
}
/**
 * Context value exposed by LineageViewContext.
 * Provides state and methods for interacting with the lineage view.
 */
interface LineageViewContextType {
  /** Whether the view is interactive (vs read-only) */
  interactive: boolean;
  /** All nodes in the current view */
  nodes: LineageGraphNodes[];
  /** Currently focused node (hovered/highlighted) */
  focusedNode?: LineageGraphNode;
  /** Currently selected nodes for batch operations */
  selectedNodes: LineageGraphNode[];
  /** Column-level lineage data if showing CLL */
  cll: ColumnLineageData | undefined;
  /** Show the context menu for a node */
  showContextMenu: (event: React.MouseEvent, node: LineageGraphNodes) => void;
  /** Current view options (filters, display settings) */
  viewOptions: LineageDiffViewOptions;
  /** Update view options */
  onViewOptionsChanged: (options: LineageDiffViewOptions) => void;
  /** Current selection mode */
  selectMode: SelectMode;
  /** Select/deselect a single node */
  selectNode: (nodeId: string) => void;
  /** Select all parent nodes up to a degree */
  selectParentNodes: (nodeId: string, degree?: number) => void;
  /** Select all child nodes up to a degree */
  selectChildNodes: (nodeId: string, degree?: number) => void;
  /** Clear selection */
  deselect: () => void;
  /** Check if a node is highlighted */
  isNodeHighlighted: (nodeId: string) => boolean;
  /** Check if a node is selected */
  isNodeSelected: (nodeId: string) => boolean;
  /** Check if an edge is highlighted */
  isEdgeHighlighted: (source: string, target: string) => boolean;
  /** Get the action state for a node */
  getNodeAction: (nodeId: string) => NodeAction;
  /** Get the columns visible for a node in CLL mode */
  getNodeColumnSet: (nodeId: string) => Set<string>;
  /** Check if a node is showing change analysis */
  isNodeShowingChangeAnalysis: (nodeId: string) => boolean;
  /** Run row count on selected nodes */
  runRowCount: () => Promise<void>;
  /** Run row count diff on selected nodes */
  runRowCountDiff: () => Promise<void>;
  /** Run value diff on selected nodes */
  runValueDiff: () => Promise<void>;
  /** Add a lineage diff check */
  addLineageDiffCheck: (viewMode?: string) => void;
  /** Add a schema diff check */
  addSchemaDiffCheck: () => void;
  /** Cancel the current action */
  cancel: () => void;
  /** Current action state */
  actionState: ActionState;
  /** Center the view on a specific node */
  centerNode: (nodeId: string) => void;
  /** Show column-level lineage for a node/column */
  showColumnLevelLineage: (cll?: CllInput) => Promise<void>;
  /** Reset column-level lineage view */
  resetColumnLevelLineage: (previous?: boolean) => Promise<void>;
}
//#endregion
export { LineageGraphColumnNode as a, LineageGraphNode as c, NodeAction as d, SelectMode as f, LineageGraph as i, LineageGraphNodes as l, isLineageGraphNode as m, ActionState as n, LineageGraphContextType as o, isLineageGraphColumnNode as p, EnvInfo as r, LineageGraphEdge as s, ActionMode as t, LineageViewContextType as u };
//# sourceMappingURL=types-CZre3j02.d.ts.map