"""Formal creation pipeline orchestration package."""

from pipeline.dedupe import dedupe_candidate_items, item_dedupe_key
from pipeline.models import PipelineJob, PipelineRun

__all__ = [
    "CreationPipelineResult",
    "PipelineJob",
    "PipelineRun",
    "dedupe_candidate_items",
    "item_dedupe_key",
    "run_creation_pipeline",
]


def __getattr__(name: str):
    if name in {"CreationPipelineResult", "run_creation_pipeline"}:
        from pipeline.creation_pipeline import CreationPipelineResult, run_creation_pipeline

        values = {
            "CreationPipelineResult": CreationPipelineResult,
            "run_creation_pipeline": run_creation_pipeline,
        }
        return values[name]
    raise AttributeError(name)
