// Типы для отзывов из PocketBase

export interface ReviewRecord {
  id: string;
  name: string;
  role?: string;
  rating: number;
  text: string;
  case_category: string | CaseCategoryRecord;
  user: string | UserRecord;
  is_verified: boolean;
  status: "pending" | "published" | "spam";
  created: string;
  updated: string;
  collectionId: string;
  collectionName: string;
}

export interface CaseCategoryRecord {
  id: string;
  name: string;
  slug: string;
  icon?: string;
  color?: string;
  order?: number;
  is_active?: boolean;
  created?: string;
  updated?: string;
}

export interface UserRecord {
  id: string;
  name: string;
  email?: string;
  avatar?: string;
  verified?: boolean;
  created?: string;
  updated?: string;
}

export interface ReviewsApiResponse {
  page: number;
  perPage: number;
  totalItems: number;
  totalPages: number;
  items: ReviewRecord[];
}

// Тип для маппинга на ReviewCard
export interface Review {
  id: string;
  name: string;
  role: string;
  avatar?: string;
  rating: number;
  date: string;
  text: string;
  caseType: string;
  verified: boolean;
}
