from __future__ import annotations

from typing import Any, Protocol, runtime_checkable

from app.models.telegram_schemas import TelegramResponse, TelegramServiceStatus


@runtime_checkable
class TelegramPort(Protocol):
    """Domain Port for external Telegram notification and bot communications."""

    async def send_message(
        self,
        text: str,
        chat_id: str | None = None,
        parse_mode: str = "HTML",
        disable_web_page_preview: bool = False,
        reply_markup: dict[str, Any] | None = None,
    ) -> TelegramResponse:
        ...

    async def get_status(self) -> TelegramServiceStatus:
        ...
