"""Composition-root factory for C12 operator-tooling services (AZ-489).

Currently exposes :func:`build_flights_api_client` — the
:class:`FlightsApiClient` used by C12's pre-flight cache-build workflow
(see AZ-326 / AZ-328 for downstream consumers).

The factory is intentionally tiny: there is only one concrete strategy
(``HttpxFlightsApiClient``) and httpx already defaults to TLS verify ON
and the system trust store, so the factory's job is to assemble the
client without re-implementing those defaults.

The richer ``OperatorToolServices`` dataclass that aggregates this
client with the rest of C12 (``CacheBuildWorkflow``,
``OperatorReLocService``, etc.) is owned by AZ-328 and intentionally
NOT created here per scope discipline.
"""

from __future__ import annotations

from typing import TYPE_CHECKING

from gps_denied_onboard.components.c12_operator_tooling.flights_api import (
    FlightsApiClient,
    HttpxFlightsApiClient,
)

if TYPE_CHECKING:
    from gps_denied_onboard.config import Config

__all__ = ["build_flights_api_client"]


def build_flights_api_client(config: Config) -> FlightsApiClient:
    """Return the operator-tier :class:`FlightsApiClient`.

    The current implementation is the production
    :class:`HttpxFlightsApiClient` with httpx defaults (TLS verify ON,
    system trust store). ``config`` is accepted for API parity with the
    other ``build_*`` factories; the client itself does not need
    composition-time configuration — the operator's base URL and auth
    token are resolved per-call by the CLI layer (AZ-326).
    """
    _ = config  # reserved for future composition-time tuning
    return HttpxFlightsApiClient()
