/**
 * Pagination, Vote, Privacy & Other DTOs
 */

// ==================== Common ====================

export interface SuccessDTO {
  success: boolean;
  message: string;
}

export interface AvailableDTO {
  available: boolean;
}

export interface CountDTO {
  count: number;
}

export interface URLDTO {
  url: string;
}

// ==================== Cursor Pagination ====================

export interface CursorPaginationRequest {
  cursor?: string;
  direction?: 'forward' | 'backward';
  page_size?: number;
  post_type?: 'follow' | 'hot' | 'latest';
  channel_id?: string;
}

export interface CursorPaginationResponse<T> {
  list: T[];
  next_cursor: string | null;
  prev_cursor: string | null;
  has_more: boolean;
}

// ==================== Vote DTOs ====================

export interface VoteOptionDTO {
  id: string;
  content: string;
  votes_count: number;
}

export interface VoteResultDTO {
  options: VoteOptionDTO[];
  total_votes: number;
  has_voted: boolean;
  voted_option_id?: string;
}

export interface CreateVotePostRequest {
  title: string;
  content?: string;
  images?: string[];
  vote_options: Array<{
    content: string;
  }>;
  channel_id?: string;
}

// ==================== Privacy & Account ====================

export type VisibilityLevel = 'everyone' | 'following' | 'self';

export interface PrivacySettingsDTO {
  followers_visibility: VisibilityLevel;
  following_visibility: VisibilityLevel;
  posts_visibility: VisibilityLevel;
  favorites_visibility: VisibilityLevel;
}

export interface PrivacySettingsRequestDTO {
  followers_visibility?: VisibilityLevel;
  following_visibility?: VisibilityLevel;
  posts_visibility?: VisibilityLevel;
  favorites_visibility?: VisibilityLevel;
}

export interface DeletionStatusDTO {
  is_pending_deletion: boolean;
  deletion_requested_at?: string;
  cool_down_days?: number;
}

export interface RequestDeletionRequestDTO {
  password: string;
}