from typing import AsyncIterator
from fastapi import UploadFile

from .base import FlightAPIBase
from models.api import (
    FlightCreateRequest,
    FlightResponse,
    FlightDetailResponse,
    FlightStatusResponse,
    DeleteResponse,
    UpdateResponse,
    BatchResponse,
    UserFixRequest,
    UserFixResponse,
    ObjectGPSResponse,
)
from models.core import GPSPoint


class FlightAPI(FlightAPIBase):
    async def create_flight(self, request: FlightCreateRequest) -> FlightResponse:
        raise NotImplementedError

    async def get_flight(self, flight_id: str) -> FlightDetailResponse:
        raise NotImplementedError

    async def get_flight_status(self, flight_id: str) -> FlightStatusResponse:
        raise NotImplementedError

    async def delete_flight(self, flight_id: str) -> DeleteResponse:
        raise NotImplementedError

    async def update_waypoints(
        self, flight_id: str, waypoints: list[GPSPoint]
    ) -> UpdateResponse:
        raise NotImplementedError

    async def upload_batch(
        self,
        flight_id: str,
        files: list[UploadFile],
        start_sequence: int,
        end_sequence: int,
        batch_number: int,
    ) -> BatchResponse:
        raise NotImplementedError

    async def submit_user_fix(
        self, flight_id: str, request: UserFixRequest
    ) -> UserFixResponse:
        raise NotImplementedError

    async def get_object_gps(
        self, flight_id: str, frame_id: int, pixel: tuple[float, float]
    ) -> ObjectGPSResponse:
        raise NotImplementedError

    async def stream_events(self, flight_id: str) -> AsyncIterator[dict]:
        raise NotImplementedError
        yield

