"""Protocol for the Likes domain service."""
from __future__ import annotations

from typing import Protocol, runtime_checkable

from sqlalchemy.ext.asyncio import AsyncSession


@runtime_checkable
class LikesService(Protocol):
    async def is_liked(
        self, session: AsyncSession, *,
        user_id: int, target_type: str,
        target_slug: str | None = None, target_id: int | None = None,
    ) -> bool: ...

    async def liked_slugs(
        self, session: AsyncSession, *,
        user_id: int, target_type: str,
    ) -> list[str]: ...

    async def liked_ids(
        self, session: AsyncSession, *,
        user_id: int, target_type: str,
    ) -> list[int]: ...

    async def toggle(
        self, session: AsyncSession, *,
        user_id: int, target_type: str,
        target_slug: str | None = None, target_id: int | None = None,
    ) -> bool: ...
