"""Hierarchy-Driven Data Mart Factory.

Automated data mart generation from hierarchy definitions
with a 4-object DDL pipeline (VW_1 → DT_2 → DT_3A → DT_3).

Prefer importing from ``databridge.mart`` when possible.
"""

try:
    from databridge.mart import (
        MartConfigGenerator,
        CortexDiscoveryAgent,
        FormulaPrecedenceEngine,
        MartPipelineGenerator,
    )
except ImportError:
    from .config_generator import MartConfigGenerator
    from .cortex_discovery import CortexDiscoveryAgent
    from .formula_engine import FormulaPrecedenceEngine
    from .pipeline_generator import MartPipelineGenerator

from .types import (
    DiscoveryResult,
    DynamicColumnMapping,
    FormulaCascade,
    FormulaPrecedence,
    JoinPattern,
    MartConfig,
    MartPipeline,
    MartValidationResult,
    PipelineLayer,
    PipelineObject,
    ReportType,
)

__all__ = [
    "MartConfigGenerator",
    "MartPipelineGenerator",
    "FormulaPrecedenceEngine",
    "CortexDiscoveryAgent",
    "MartConfig",
    "JoinPattern",
    "DynamicColumnMapping",
    "PipelineObject",
    "MartPipeline",
    "PipelineLayer",
    "FormulaPrecedence",
    "FormulaCascade",
    "DiscoveryResult",
    "MartValidationResult",
    "ReportType",
]
