export enum RoomType {
  /** S: 1: 1 대화 */
  Single = 'S',
  /** M: 멀티대화 */
  Multi = 'M',
  /** B: Bot대화 */
  Bot = 'B',
  /** A: 알림방 */
  Allim = 'A',

  // // X: 확장대화 deprecated
  // Extend = 'E',
  // // N: 공지대화 deprecated
  // Notice = 'N',

  /** L: 링크(Legacy) */
  Link = 'L',
  /** K: MyTalk(나와의 대화) */
  Mytalk = 'K'
}

export enum RoomExitType {
  // A 만 사용하고 있고, 서버에서도 달리 처리하지는 않음, 하지만 추후 사용성을 위해 생성.
  All = 'A'
}

export function isGroupRoom(roomType: RoomType): boolean {
  return RoomType.Multi === roomType;
}

export function isSendRoom(roomType: RoomType): boolean {
  return (
    RoomType.Single === roomType ||
    RoomType.Multi === roomType ||
    RoomType.Mytalk === roomType
  );
}

export function isFunctionRoom(roomType: RoomType): boolean {
  return (
    RoomType.Single === roomType ||
    RoomType.Multi === roomType ||
    RoomType.Mytalk === roomType
  );
}

export function isReadCountRoom(roomType: RoomType): boolean {
  return (
    RoomType.Single === roomType ||
    RoomType.Multi === roomType ||
    RoomType.Bot === roomType ||
    RoomType.Allim === roomType
  );
}
