"""C5 State Estimator component — public API.

Per the C5 contract (``state_estimator_protocol.md`` v1.0.0), the
public surface consists of:

- :class:`StateEstimator` Protocol
- :class:`EstimatorOutput`, :class:`EstimatorHealth`, :class:`IsamState`
  DTOs (in ``_types/state.py``)
- :class:`PoseSourceLabel` enum (in ``_types/state.py``; shared with C4)
- :class:`C5StateConfig` config block (registered on import)
- Error hierarchy: :class:`StateEstimatorError` and three subclasses

The ``ISam2GraphHandle`` Protocol + ``ISam2GraphHandleImpl`` skeleton
live in the private ``_isam2_handle`` module — consumers import them
from the composition root, not from here.
"""

from gps_denied_onboard._types.state import (
    EstimatorHealth,
    EstimatorOutput,
    IsamState,
    PoseSourceLabel,
    Quat,
)
from gps_denied_onboard.components.c5_state.config import C5StateConfig
from gps_denied_onboard.components.c5_state.errors import (
    EstimatorAlreadyStartedError,
    EstimatorDegradedError,
    EstimatorFatalError,
    StateEstimatorConfigError,
    StateEstimatorError,
)
from gps_denied_onboard.components.c5_state.interface import StateEstimator
from gps_denied_onboard.config.schema import register_component_block

__all__ = [
    "C5StateConfig",
    "EstimatorAlreadyStartedError",
    "EstimatorDegradedError",
    "EstimatorFatalError",
    "EstimatorHealth",
    "EstimatorOutput",
    "IsamState",
    "PoseSourceLabel",
    "Quat",
    "StateEstimator",
    "StateEstimatorConfigError",
    "StateEstimatorError",
]


# Register the c5_state config block on import. The composition root
# loads this module before `load_config(...)` so the block is in the
# registry by the time YAML/env overrides resolve.
register_component_block("c5_state", C5StateConfig)
