"""C11 `TileDownloader` + `TileUploader` Protocols.

Operator-side ONLY — excluded from airborne via CMake (`BUILD_C11_TILE_MANAGER=OFF`).
See `_docs/02_document/components/12_c11_tilemanager/`.
"""

from __future__ import annotations

from collections.abc import Iterable
from pathlib import Path
from typing import Protocol

from gps_denied_onboard._types.tile import TileRecord


class TileDownloader(Protocol):
    """Pre-flight tile download from `satellite-provider`."""

    def download(
        self, lat_lon_box: tuple[float, float, float, float], zoom: int, output_root: Path
    ) -> Iterable[TileRecord]: ...


class TileUploader(Protocol):
    """Post-landing batch upload to the `satellite-provider` ingest endpoint (D-PROJ-2)."""

    def upload(self, tiles: Iterable[TileRecord], flight_id: str) -> None: ...
