from datetime import datetime

from async_property import async_property

from connectsensor.const import APIResponse

class _BaseTank:
    def __init__(self, client: object, signalman_no: str) -> None: ...
    def unpack_tank_data(self, response: APIResponse) -> None: ...
    def transform_history_data(self, data: dict[str, list[dict]]) -> list[dict]: ...

class Tank(_BaseTank):
    @property
    def level(self) -> int: ...
    @property
    def serial_number(self) -> str: ...
    @property
    def model(self) -> str: ...
    @property
    def name(self) -> str: ...
    @property
    def capacity(self) -> int: ...
    @property
    def last_read(self) -> datetime: ...
    def history(
        self,
        start_date: datetime | None = None,
        end_date: datetime | None = None,
    ) -> APIResponse: ...

class AsyncTank(_BaseTank):
    @async_property
    async def level(self) -> int: ...
    @async_property
    async def serial_number(self) -> str: ...
    @async_property
    async def model(self) -> str: ...
    @async_property
    async def name(self) -> str: ...
    @async_property
    async def capacity(self) -> int: ...
    @async_property
    async def last_read(self) -> datetime: ...
    async def history(
        self,
        start_date: datetime | None = None,
        end_date: datetime | None = None,
    ) -> APIResponse: ...
