"""Zalo Gateway Port (Outbound Network Interface)."""

from __future__ import annotations

from typing import Any, Protocol, runtime_checkable


@runtime_checkable
class ZaloGatewayPort(Protocol):
    """Secondary Port for communicating with external Zalo Bridge service."""

    async def send_message(
        self, target_id: str, message: str, is_group: bool = False
    ) -> dict[str, Any]:
        """Send a message to a Zalo user or group chat."""
        ...

    async def get_qr(self) -> dict[str, Any]:
        """Fetch QR code for Zalo login."""
        ...

    async def get_status(self) -> dict[str, Any]:
        """Check login status of Zalo session."""
        ...

    async def get_friends_and_groups(
        self,
    ) -> tuple[list[dict[str, Any]], list[dict[str, Any]]]:
        """Fetch friends and group lists from Zalo Bridge."""
        ...
