"""Voice library repository port."""

from __future__ import annotations

from typing import List, Optional, Protocol

from packages.domain.voice_library import VoiceLibraryItem


class VoiceLibraryRepository(Protocol):
    """配音库仓储接口"""

    def list_by_user(
        self,
        user_id: str,
        *,
        status: Optional[str] = None,
        skip: int = 0,
        limit: int = 50,
    ) -> List[VoiceLibraryItem]: ...

    def get(self, voice_id: str, user_id: str) -> Optional[VoiceLibraryItem]: ...

    def create(self, item: VoiceLibraryItem) -> VoiceLibraryItem: ...

    def update(self, item: VoiceLibraryItem) -> VoiceLibraryItem: ...

    def delete(self, voice_id: str, user_id: str) -> bool: ...

    def count_by_user(self, user_id: str) -> int: ...
