export interface City {
  id: number;
  name: string;
  slug: string;
}

export interface ProjectType {
  id: number;
  name: string;
  slug: string;
  min_roi: number;
  max_roi: number;
  avg_roi: number;
  min_share_value: number;
}

export interface Category {
  id: number;
  name: string;
  slug: string;
  icon: string;
  status: "active" | "inactive";
  created_at: string;
  updated_at: string;
  projects_count: number;
  min_roi: number;
  max_roi: number;
  avg_roi: number;
  min_share_value: number;
}

export interface Project {
  id: number;
  project_id: number;
  title: string;
  slug: string;
  code: string;
  description: string;
  type_id: number;
  city_id: number;
  share_type: "fixed" | "renewable" | "infinite";
  number_of_shares: number;
  share_sold: number;
  share_value: number;
  roi: number;
  effective_date: string;
  maturity_date: string | null;
  renewal_date: string | null;
  marketplace_resale: boolean;
  roi_distribution: "monthly" | "yearly";
  address?: string;
  size?: number;
  latitude?: number;
  longitude?: number;
  thumbnail: string;
  gallery?: { id: number; url: string }[];
  video_tour_url?: string | null;
  is_featured: boolean;
  completion_date: string | null;
  completed_at: string | null;
  listing?: ProjectListingData;
  status: "published" | "draft" | "archived";
  created_at: string;
  updated_at: string;
  total_investors: number;
  city: City;
  type: ProjectType;
  documents?: any[];
  features?: any[];
  reviews?: any[];
}

export interface ProjectDetails extends Project {
  listed_shares: number;
  active_shares: number;
}

export interface PaginationLink {
  url: string | null;
  label: string;
  page: number | null;
  active: boolean;
}

export interface ProjectsResponse {
  current_page: number;
  data: Project[];
  first_page_url: string;
  from: number;
  last_page: number;
  last_page_url: string;
  links: PaginationLink[];
  next_page_url: string | null;
  path: string;
  per_page: number;
  prev_page_url: string | null;
  to: number;
  total: number;
}
export interface Seller {
  id: number;
  full_name: string;
  username: string;
  email: string;
  avatar: string | null;
}

export interface ProjectListingData {
  id: number;
  project_id: number;
  seller_id: number;
  price: number;
  number_of_shares: number;
  status: string;
  created_at: string;
  project: Project;
  seller: Seller;
  share_value: number; // Added to match usage in snippet if not present
}
