from dataclasses import dataclass
from typing import Any, Dict, List

from src.internals.internal_types import PageProps
from src.types.kemono import Approved_DM


@dataclass
class ArtistDisplayData:
    service: str
    href: str


@dataclass
class ArtistPageProps(PageProps):
    currentPage = "posts"
    id: str
    service: str
    name: str
    count: int
    limit: int
    artist: Dict
    display_data: ArtistDisplayData
    dm_count: int
    share_count: int
    has_links: str


@dataclass
class ArtistShareProps(PageProps):
    currentPage = "shares"
    id: str
    service: str
    artist: Dict
    display_data: ArtistDisplayData
    dm_count: int
    share_count: int
    has_links: str


@dataclass
class ArtistDMsProps(PageProps):
    currentPage = "dms"
    id: str
    service: str
    artist: Dict
    display_data: ArtistDisplayData
    dm_count: int
    dms: List[Approved_DM]
    share_count: int
    has_links: str


@dataclass
class ArtistFancardsProps(PageProps):
    id: str
    artist: Dict
    display_data: ArtistDisplayData
    fancards: List[Any]  # todo remove any
    share_count: int
    dm_count: int
    has_links: str
    currentPage: str = "fancards"
    service: str = "fanbox"


@dataclass
class ArtistAnnouncementsProps(PageProps):
    id: str
    service: str
    artist: Dict
    announcements: List[Any]  # todo
    # count: int
    share_count: int
    dm_count: int
    has_links: str
    display_data: ArtistDisplayData
    currentPage: str = "announcements"
    limit: int = 50


@dataclass
class LinkedAccountsProps(PageProps):
    id: str
    service: str
    artist: dict
    share_count: int
    dm_count: int
    has_links: str
    linked_accounts = []
    display_data: ArtistDisplayData
    currentPage: str = "linked_accounts"
