/**
 * @copyright NHCarrigan
 * @license Naomi's Public License
 * @author Naomi Carrigan
 */
/* eslint-disable @typescript-eslint/naming-convention -- Enum members use UPPER_CASE for database values */
/* eslint-disable import/group-exports -- Multiple exports for better organization */

export enum ReportReason {
  INAPPROPRIATE_CONTENT = "INAPPROPRIATE_CONTENT",
  HARASSMENT = "HARASSMENT",
  SPAM = "SPAM",
  IMPERSONATION = "IMPERSONATION",
  OFFENSIVE_NAME = "OFFENSIVE_NAME",
  MALICIOUS_LINKS = "MALICIOUS_LINKS",
  OTHER = "OTHER",
}

export enum ReportStatus {
  PENDING = "PENDING",
  REVIEWED = "REVIEWED",
  DISMISSED = "DISMISSED",
  ACTION_TAKEN = "ACTION_TAKEN",
}

export interface ProfileReport {
  id:             string;
  reportedUserId: string;
  reporterId:     string;
  reason:         ReportReason;
  details:        string;
  status:         ReportStatus;
  reviewedBy?:    string;
  reviewNotes?:   string;
  createdAt:      Date;
  updatedAt:      Date;
}

export interface ProfileReportWithUsers extends ProfileReport {
  reportedUser: {
    id:           string;
    username:     string;
    displayName?: string;
    avatar?:      string;
  };
  reporter: {
    id:           string;
    username:     string;
    displayName?: string;
    avatar?:      string;
  };
  reviewer?: {
    id:           string;
    username:     string;
    displayName?: string;
  };
}

export interface CreateReportDto {
  reportedUserId: string;
  reason:         ReportReason;
  details:        string;
}

export interface UpdateReportDto {
  status:       ReportStatus;
  reviewNotes?: string;
}

export interface CommentReport {
  id:                string;
  reportedCommentId: string;
  reporterId:        string;
  reason:            ReportReason;
  details:           string;
  status:            ReportStatus;
  reviewedBy?:       string;
  reviewNotes?:      string;
  createdAt:         Date;
  updatedAt:         Date;
}

export interface CommentReportWithDetails extends CommentReport {
  reportedComment: {
    id:          string;
    content:     string;
    rawContent?: string;
    userId:      string;
    user: {
      id:           string;
      username:     string;
      displayName?: string;
      avatar?:      string;
    };
  };
  reporter: {
    id:           string;
    username:     string;
    displayName?: string;
    avatar?:      string;
  };
  reviewer?: {
    id:           string;
    username:     string;
    displayName?: string;
  };
}

export interface CreateCommentReportDto {
  reportedCommentId: string;
  reason:            ReportReason;
  details:           string;
}

export interface UpdateCommentReportDto {
  status:       ReportStatus;
  reviewNotes?: string;
}
