from typing import Any

from .builder import AlgorithmBuilder, VarHandle, builder
from .pipeline import Pipeline, apply, pipeline

class Graph:
    def __init__(self, *args: Any, **kwargs: Any) -> None: ...
    def add_node(self, *args: Any, **kwargs: Any) -> int: ...
    def add_edge(self, *args: Any, **kwargs: Any) -> int: ...
    def view(self) -> "Subgraph": ...
    def connected_components(self, *args: Any, **kwargs: Any) -> Any: ...
    def snapshot_at_commit(self, commit_id: int) -> "TemporalSnapshot": ...
    def snapshot_at_timestamp(self, timestamp: int) -> "TemporalSnapshot": ...
    nodes: Any
    edges: Any

class Subgraph:
    def apply(self, algorithm_or_pipeline: Any) -> "Subgraph": ...
    def table(self) -> Any: ...
    def viz(self) -> Any: ...

class TemporalSnapshot:
    def commit_id(self) -> int: ...
    def timestamp(self) -> int: ...
    def author(self) -> str: ...
    def message(self) -> str: ...
    def parents(self) -> list[int]: ...
    def node_exists(self, node_id: int) -> bool: ...
    def edge_exists(self, edge_id: int) -> bool: ...
    def node_attr(self, node_id: int, attr: str) -> Any: ...
    def neighbors(self, node_id: int) -> list[int]: ...
    def neighbors_bulk(self, nodes: list[int]) -> dict[int, list[int]]: ...
    def existence(self) -> "ExistenceIndex": ...
    def as_subgraph(self) -> Subgraph: ...

class ExistenceIndex:
    def contains_node(self, node_id: int) -> bool: ...
    def contains_edge(self, edge_id: int) -> bool: ...
    def nodes(self) -> list[int]: ...
    def edges(self) -> list[int]: ...

__all__ = [
    "Graph",
    "Subgraph",
    "pipeline",
    "Pipeline",
    "apply",
    "builder",
    "AlgorithmBuilder",
    "VarHandle",
    "TemporalSnapshot",
    "ExistenceIndex",
]
