"""C12 FlightsApiClient (AZ-489 / ADR-010).

Read-only resolver that maps an operator-planned mission to the inputs C12
needs for the build-cache workflow:

* :class:`FlightDto` carries the parent-suite ``Flight`` (ordered waypoints
  + altitudes) used to derive the cache bbox and the takeoff origin.
* :func:`bbox_from_waypoints` envelopes the lat/lon and inflates by a
  horizontal-distance buffer (NOT a degree-space buffer) via
  :class:`~gps_denied_onboard.helpers.wgs_converter.WgsConverter`.
* :func:`takeoff_origin_from_flight` returns ``waypoints[0]`` as a
  :class:`~gps_denied_onboard._types.geo.LatLonAlt`.

Two sources produce the same DTO shape:

* :meth:`FlightsApiClient.fetch_flight` — HTTPS against the parent-suite
  ``flights`` REST service (online path).
* :meth:`FlightsApiClient.load_flight_file` — JSON on disk (offline path).

Public surface is frozen by
``_docs/02_document/contracts/c12_operator_tooling/flights_api_client.md``
v1.0.0.
"""

from __future__ import annotations

from gps_denied_onboard.components.c12_operator_tooling.flights_api.bbox import (
    bbox_from_waypoints,
    takeoff_origin_from_flight,
)
from gps_denied_onboard.components.c12_operator_tooling.flights_api.errors import (
    EmptyWaypointsError,
    FlightFileNotFoundError,
    FlightNotFoundError,
    FlightsApiAuthError,
    FlightsApiError,
    FlightsApiSchemaError,
    FlightsApiUnreachableError,
    WaypointSchemaError,
)
from gps_denied_onboard.components.c12_operator_tooling.flights_api.file_loader import (
    load_flight_file,
)
from gps_denied_onboard.components.c12_operator_tooling.flights_api.httpx_client import (
    HttpxFlightsApiClient,
)
from gps_denied_onboard.components.c12_operator_tooling.flights_api.interface import (
    FlightDto,
    FlightsApiClient,
    WaypointDto,
    WaypointObjective,
    WaypointSource,
)

__all__ = [
    "EmptyWaypointsError",
    "FlightDto",
    "FlightFileNotFoundError",
    "FlightNotFoundError",
    "FlightsApiAuthError",
    "FlightsApiClient",
    "FlightsApiError",
    "FlightsApiSchemaError",
    "FlightsApiUnreachableError",
    "HttpxFlightsApiClient",
    "WaypointDto",
    "WaypointObjective",
    "WaypointSchemaError",
    "WaypointSource",
    "bbox_from_waypoints",
    "load_flight_file",
    "takeoff_origin_from_flight",
]
