from typing import Optional, List, Any

from ....core.enums.state import State
from ....core.interfaces.dto import Dto
from ....core.enums.status import Status
from ....core.interfaces.core import Core
from ....enums.conjoint.channels import ChannelType, ChannelScope


class Channel[Properties: Any](Core[Properties]):
  type: ChannelType
  scope: ChannelScope

  name: Optional[str]
  title: Optional[str]

  state: Optional[State]
  status: Optional[Status]

  profile: Optional[str]
  account: Optional[str]
  pinned_messages: Optional[List[str]]  # Message ID


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


class ChannelDto[Properties: Any](Dto[Properties]):
  type: ChannelType
  scope: ChannelScope

  name: Optional[str]
  title: Optional[str]

  state: Optional[State]
  status: Optional[Status]

  profile: Optional[str]
  account: Optional[str]
  pinned_messages: Optional[List[str]]  # Message ID
