from typing import Optional, List, Any
from datetime import datetime

from ....core.enums.state import State
from ....core.interfaces.dto import Dto
from ....core.enums.gender import Gender
from ....core.interfaces.core import Core
from ....enums.identity.profiles import ProfileType


class Profile[Properties: Any](Core[Properties]):
  type: ProfileType
  gender: Gender

  state: State

  cover: Optional[str]
  avatar: Optional[str]
  gallery: Optional[List[str]]

  nickname: Optional[str]
  last_name: Optional[str]
  first_name: Optional[str]
  middle_name: Optional[str]

  nationality: Optional[str]
  national_code: Optional[str]

  verified_at: Optional[datetime]
  verified_by: Optional[str]
  verified_in: Optional[str]

  birthdate: Optional[datetime]


# ----------------------------------------
# Data Transfer Object Interface
# ----------------------------------------


class ProfileDto[Properties: Any](Dto[Properties]):
  type: ProfileType
  gender: Gender

  state: Optional[State]

  cover: Optional[str]
  avatar: Optional[str]
  gallery: Optional[List[str]]

  nickname: Optional[str]
  last_name: Optional[str]
  first_name: Optional[str]
  middle_name: Optional[str]

  nationality: Optional[str]
  national_code: Optional[str]

  verified_at: Optional[datetime]
  verified_by: Optional[str]
  verified_in: Optional[str]

  birthdate: Optional[datetime]
