"""Legacy C6 tile-cache scaffolding DTOs.

AZ-303 froze the canonical C6 contract; ``TileQualityMetadata`` and
``SectorClassification`` (as a dataclass) moved into
``gps_denied_onboard.components.c6_tile_cache._types`` (the former
matches 1:1; the latter became a ``str, Enum``).

The two remaining types here (``Tile``, ``TileRecord``) are still
referenced by the C3 / C11 scaffolding Protocols
(``components/c3_matcher/interface.py``,
``components/c11_tile_manager/interface.py``). Their own component
tasks (AZ-344 for C3, AZ-316 / AZ-319 for C11) will replace those
Protocol stubs with the AZ-303 DTOs; this file disappears in the
same migration step.
"""

from __future__ import annotations

from dataclasses import dataclass, field
from datetime import datetime
from typing import Any


@dataclass(frozen=True)
class Tile:
    """Scaffolding satellite-tile DTO used by the C3 matcher Protocol stub.

    Superseded by :class:`gps_denied_onboard.components.c6_tile_cache.TileMetadata`;
    held here only until AZ-344 retires the C3 scaffolding.
    """

    tile_id: str
    zoom_level: int
    latitude: float
    longitude: float
    tile_size_meters: float
    tile_size_pixels: int
    image_path: str


@dataclass(frozen=True)
class TileRecord:
    """Scaffolding Postgres row used by the C11 manager Protocol stub.

    Superseded by :class:`gps_denied_onboard.components.c6_tile_cache.TileMetadata`;
    held here only until AZ-316 / AZ-319 retire the C11 scaffolding.
    """

    tile_id: str
    zoom_level: int
    latitude: float
    longitude: float
    tile_size_meters: float
    tile_size_pixels: int
    source: str
    voting_status: str = "trusted"
    flight_id: str | None = None
    companion_id: str | None = None
    capture_timestamp: datetime | None = None
    metadata: dict[str, Any] = field(default_factory=dict)
