export interface Pagination<T> {
  result: T;
  page: number;
  pageSize: number;
  total: number;
}
export interface SupportIssueCategory {
  id: string;
  name: string;
}

export interface SupportIssue {
  id: string;
  createdByUserId: string;
  createdByUserName: string;
  createdAt: string;
  updatedAt: string;
  title: string;
  status: string;
  unreadCount: number;
  lastMessage?: string;
  category: SupportIssueCategory;
}

export interface SupportIssueWithMessage
  extends Omit<SupportIssue, "unreadCount" | "lastMessage"> {
  message: SupportIssueMessage[];
}

export interface SupportIssueMessage {
  id: string;
  fromUserId: string;
  fromUserName: string;
  createdAt: string;
  updatedAt: string;
  content: string;
  read: boolean;
  issueId: string;
}

export interface SupportMessageStatus {
  fromUserId: string;
  fromUserName: string;
  lastAccessDate: string;
  issueId: string;
}

export interface SupportMessageStatusResponse {
  result: SupportMessageStatus[];
}

export interface SupportUserStatus {
  socketId: string;
  userId: string;
  name: string;
  role: string[];
}

export type SupportIssueResponse = Pagination<SupportIssue[]>;
export type SupportIssueCategoryResponse = {
  result: SupportIssueCategory[];
};
export type SupportMessageResponse = Pagination<SupportIssueWithMessage>;
