import type { User, Trail, GearItem, ForumPost, RidingEvent } from './types';
import { PlaceHolderImages } from './placeholder-images';

const getImage = (id: string) => {
  const img = PlaceHolderImages.find((p) => p.id === id);
  return {
    url: img?.imageUrl || 'https://picsum.photos/seed/error/400/400',
    hint: img?.imageHint || 'placeholder',
  };
};

export const users: User[] = [
  { id: 'u1', name: 'Aarav Sharma', avatarUrl: getImage('avatar-1').url, avatarHint: getImage('avatar-1').hint },
  { id: 'u2', name: 'Bikram Thapa', avatarUrl: getImage('avatar-2').url, avatarHint: getImage('avatar-2').hint },
  { id: 'u3', name: 'Priya Gurung', avatarUrl: getImage('avatar-3').url, avatarHint: getImage('avatar-3').hint },
];

export const trails: Trail[] = [
  {
    id: 't1',
    name: 'Sarangkot Sunrise Ride',
    location: 'Pokhara, Nepal',
    difficulty: 'Intermediate',
    length: '25 km',
    elevation: '700 m',
    description:
      'A breathtaking ride up to Sarangkot to witness the sunrise over the Annapurna mountain range. The road is paved but has sharp, winding turns.',
    imageUrl: getImage('trail-1').url,
    imageHint: getImage('trail-1').hint,
    likes: 188,
    comments: 22,
  },
  {
    id: 't2',
    name: 'Upper Mustang Mayhem',
    location: 'Upper Mustang, Nepal',
    difficulty: 'Advanced',
    length: '150 km',
    elevation: '4,200 m',
    description:
      'An epic, high-altitude desert adventure through the forbidden kingdom of Mustang. This route is challenging with river crossings, rocky sections, and unpredictable weather. For experienced riders only.',
    imageUrl: getImage('trail-2').url,
    imageHint: getImage('trail-2').hint,
    likes: 412,
    comments: 65,
  },
  {
    id: 't3',
    name: 'Pokhara Lakeside Loop',
    location: 'Pokhara, Nepal',
    difficulty: 'Beginner',
    length: '35 km',
    elevation: '200 m',
    description:
      'A relaxed and scenic cruise around the beautiful Phewa Lake in Pokhara. Perfect for a chill day with stunning views of the water and mountains.',
    imageUrl: getImage('trail-3').url,
    imageHint: getImage('trail-3').hint,
    likes: 550,
    comments: 41,
  },
  {
    id: 't4',
    name: 'Nagarkot Hill Climb',
    location: 'Nagarkot, Nepal',
    difficulty: 'Intermediate',
    length: '32 km',
    elevation: '1,500 m',
    description:
      'A popular route from Kathmandu to Nagarkot, famous for its panoramic Himalayan views. A mix of paved roads and light off-road sections.',
    imageUrl: getImage('trail-4').url,
    imageHint: getImage('trail-4').hint,
    likes: 310,
    comments: 35,
  },
];

export const gear: GearItem[] = [
  {
    id: 'g1',
    name: 'Pagal Toli "Himalayan Stallion" Enduro',
    category: 'Bike Parts',
    price: 9500.00,
    description:
      'Built to conquer the Himalayas. This enduro bike features a powerful 450cc engine, long-travel suspension, and a rugged frame.',
    images: [getImage('gear-1'), getImage('trail-1'), getImage('trail-2')],
    rating: 4.9,
    reviewCount: 55,
    stock: 10,
    sizes: ['N/A'],
    colors: ['Himalayan White', 'Tibetan Orange', 'Guerilla Green'],
  },
  {
    id: 'g2',
    name: 'Aero Evo Helmet',
    category: 'Protective Gear',
    price: 799.99,
    description:
      'Full-face protection with maximum aerodynamics and ventilation. Features a lightweight carbon shell and advanced safety certifications.',
    images: [getImage('gear-2')],
    rating: 4.9,
    reviewCount: 115,
    stock: 35,
    sizes: ['S', 'M', 'L'],
    colors: ['White', 'Black', 'Hi-Viz Yellow'],
  },
  {
    id: 'g3',
    name: 'Adrenaline Racing Gloves',
    category: 'Apparel',
    price: 149.99,
    description:
      'Feel the controls, not the vibration. Full gauntlet leather gloves with carbon fiber knuckles and palm sliders.',
    images: [getImage('gear-3')],
    rating: 4.8,
    reviewCount: 310,
    stock: 80,
    sizes: ['S', 'M', 'L', 'XL'],
    colors: ['Black', 'Red/White', 'Blue'],
  },
  {
    id: 'g4',
    name: 'Vented Leather Jacket',
    category: 'Apparel',
    price: 499.99,
    description:
      'Stay cool under pressure. This jacket is made from perforated leather with CE-rated armor in the shoulders and elbows.',
    images: [getImage('gear-4')],
    rating: 4.7,
    reviewCount: 95,
    stock: 25,
    sizes: ['48', '50', '52', '54'],
    colors: ['Black', 'Brown'],
  },
  {
    id: 'g5',
    name: 'MX-PRO Knee Guards',
    category: 'Protective Gear',
    price: 129.99,
    description:
      'Hinged knee guards for maximum mobility and protection on the dirt. Impact-absorbing foam and a tough outer shell.',
    images: [getImage('gear-5')],
    rating: 4.8,
    reviewCount: 180,
    stock: 50,
    sizes: ['S/M', 'L/XL'],
    colors: ['Black'],
  },
  {
    id: 'g6',
    name: 'Enduro Hydration Pack',
    category: 'Apparel',
    price: 149.99,
    description:
      'Carry water and tools for a full day on the trails. Slim profile fits over or under your jacket.',
    images: [getImage('gear-6')],
    rating: 4.9,
    reviewCount: 112,
    stock: 40,
    sizes: ['One Size'],
    colors: ['Stealth Gray', 'Orange'],
  },
];

export const forumPosts: ForumPost[] = [
  {
    id: 'fp1',
    title: 'Best off-road tires for Mustang?',
    author: users[1],
    createdAt: '2 days ago',
    replies: 35,
    views: 3105,
    lastReply: { author: users[2], timestamp: '2 hours ago' },
  },
  {
    id: 'fp2',
    title: 'Trip Report: Kathmandu to Jomsom on a 250cc',
    author: users[0],
    createdAt: '6 days ago',
    replies: 52,
    views: 6120,
    lastReply: { author: users[1], timestamp: '45 minutes ago' },
  },
  {
    id: 'fp3',
    title: 'How to prepare your bike for a high-altitude ride?',
    author: users[2],
    createdAt: '1 week ago',
    replies: 22,
    views: 2453,
    lastReply: { author: users[0], timestamp: 'yesterday' },
  },
  {
    id: 'fp4',
    title: 'Beginner looking for riding buddies in Kathmandu',
    author: users[1],
    createdAt: '3 days ago',
    replies: 12,
    views: 950,
    lastReply: { author: users[2], timestamp: '10 hours ago' },
  },
];

export const events: RidingEvent[] = [
  {
    id: 're1',
    destination: 'Everest Base Camp View Ride',
    date: 'Saturday, July 27th, 2024',
    distance: '450 km',
    duration: '3 Days',
    daycation: 'Teahouse Stay',
    activities: 'An adventurous ride towards the Everest region, reaching as far as legally possible on a motorbike for incredible views. This is a challenging multi-day trip involving high altitudes and rough terrain.',
  },
  {
    id: 're2',
    destination: 'Chitwan Jungle Safari',
    date: 'Saturday, April 12th, 2024',
    distance: '200 km',
    duration: '2 Days',
    daycation: 'Jungle Lodge',
    activities: 'A ride down to Chitwan National Park to explore the wildlife. A mix of highway and easy off-road trails.',
  }
];
