import type { Product } from '../types/product'

export const PRODUCT_IMAGE = '/product-template.png'

const catalog: Omit<Product, 'id' | 'image' | 'thumbnail' | 'commentCount'>[] = [
  { nameEn: 'iPhone 15 Pro Digital', nameFa: 'آیفون ۱۵ پرو دیجیتال', categoryId: '2', category: 'Mobile Apps', summary: 'Premium mobile digital product license.', description: '<p>Full digital access to iPhone 15 Pro features and assets.</p>', images: [PRODUCT_IMAGE], tags: ['mobile', 'premium'], status: 'active' },
  { nameEn: 'Samsung Galaxy Bundle', nameFa: 'بسته سامسونگ گلکسی', categoryId: '2', category: 'Mobile Apps', summary: 'Complete Samsung Galaxy digital bundle.', description: '<p>Includes apps, themes and exclusive digital content.</p>', images: [PRODUCT_IMAGE], tags: ['samsung', 'bundle'], status: 'active' },
  { nameEn: 'MacBook Pro License', nameFa: 'لایسنس مک‌بوک پرو', categoryId: '3', category: 'Desktop Software', summary: 'Professional desktop software license.', description: '<p>Desktop tools and utilities for creative professionals.</p>', images: [PRODUCT_IMAGE], tags: ['desktop', 'pro'], status: 'active' },
  { nameEn: 'Wireless Earbuds Pro', nameFa: 'هدفون بی‌سیم پرو', categoryId: '4', category: 'Digital Downloads', summary: 'Digital audio companion package.', description: '<p>Sound profiles, presets and companion app access.</p>', images: [PRODUCT_IMAGE], tags: ['audio'], status: 'active' },
  { nameEn: 'Smart Watch Ultra', nameFa: 'ساعت هوشمند اولترا', categoryId: '4', category: 'Digital Downloads', summary: 'Smartwatch digital asset pack.', description: '<p>Watch faces, widgets and fitness tracking modules.</p>', images: [PRODUCT_IMAGE], tags: ['wearable'], status: 'active' },
  { nameEn: 'Gaming Console Pack', nameFa: 'بسته کنسول بازی', categoryId: '10', category: 'Console Games', summary: 'Console gaming content bundle.', description: '<p>Digital games and DLC for console platforms.</p>', images: [PRODUCT_IMAGE], tags: ['gaming', 'console'], status: 'active' },
  { nameEn: '4K Monitor Asset', nameFa: 'دارایی مانیتور ۴ک', categoryId: '6', category: 'Templates & Assets', summary: 'Display calibration and UI assets.', description: '<p>4K display templates and calibration tools.</p>', images: [PRODUCT_IMAGE], tags: ['display'], status: 'draft' },
  { nameEn: 'Mechanical Keyboard Kit', nameFa: 'کیت کیبورد مکانیکی', categoryId: '4', category: 'Digital Downloads', summary: 'Keyboard customization digital kit.', description: '<p>Layouts, macros and RGB profiles.</p>', images: [PRODUCT_IMAGE], tags: ['keyboard'], status: 'active' },
  { nameEn: 'Portable SSD 2TB', nameFa: 'اس‌اس‌دی پرتابل ۲ ترابایت', categoryId: '4', category: 'Digital Downloads', summary: 'Cloud storage management suite.', description: '<p>Backup tools and sync utilities.</p>', images: [PRODUCT_IMAGE], tags: ['storage'], status: 'active' },
  { nameEn: 'Tablet Pro Subscription', nameFa: 'اشتراک تبلت پرو', categoryId: '7', category: 'Subscriptions', summary: 'Monthly tablet productivity suite.', description: '<p>Apps and cloud features for tablet users.</p>', images: [PRODUCT_IMAGE], tags: ['subscription'], status: 'active' },
  { nameEn: 'Action Camera HD', nameFa: 'دوربین اکشن اچ‌دی', categoryId: '4', category: 'Digital Downloads', summary: 'Video editing presets for action cam.', description: '<p>LUTs, transitions and export profiles.</p>', images: [PRODUCT_IMAGE], tags: ['video'], status: 'active' },
  { nameEn: 'Bluetooth Speaker Mini', nameFa: 'اسپیکر بلوتوث مینی', categoryId: '4', category: 'Digital Downloads', summary: 'Audio enhancement digital pack.', description: '<p>EQ presets and companion app features.</p>', images: [PRODUCT_IMAGE], tags: ['speaker'], status: 'active' },
  { nameEn: 'Pro Photo Editor', nameFa: 'ویرایشگر حرفه‌ای عکس', categoryId: '1', category: 'Software & Apps', summary: 'Professional photo editing software.', description: '<p>Advanced editing tools and filters.</p>', images: [PRODUCT_IMAGE], tags: ['photo', 'editor'], status: 'active' },
  { nameEn: 'Space Quest Game', nameFa: 'بازی ماجراجویی فضایی', categoryId: '9', category: 'PC Games', summary: 'Epic space adventure game.', description: '<p>Explore galaxies in this digital download.</p>', images: [PRODUCT_IMAGE], tags: ['game', 'space'], status: 'active' },
  { nameEn: 'JavaScript Mastery eBook', nameFa: 'کتاب جاوااسکریپت پیشرفته', categoryId: '5', category: 'E-books & Courses', summary: 'Complete JS learning guide.', description: '<p>From basics to advanced patterns.</p>', images: [PRODUCT_IMAGE], tags: ['ebook', 'javascript'], status: 'active' },
  { nameEn: 'UI Kit Template Pack', nameFa: 'بسته قالب رابط کاربری', categoryId: '6', category: 'Templates & Assets', summary: 'Modern UI component library.', description: '<p>Figma and code-ready components.</p>', images: [PRODUCT_IMAGE], tags: ['ui', 'template'], status: 'draft' },
  { nameEn: 'VPN Pro Subscription', nameFa: 'اشتراک وی‌پی‌ان حرفه‌ای', categoryId: '7', category: 'Subscriptions', summary: 'Secure VPN annual plan.', description: '<p>Privacy and security for all devices.</p>', images: [PRODUCT_IMAGE], tags: ['vpn', 'security'], status: 'active' },
  { nameEn: 'Music Stream Premium', nameFa: 'پخش موسیقی پریمیوم', categoryId: '7', category: 'Subscriptions', summary: 'Unlimited music streaming.', description: '<p>Ad-free listening across platforms.</p>', images: [PRODUCT_IMAGE], tags: ['music'], status: 'active' },
  { nameEn: 'Cloud Storage 1TB', nameFa: 'فضای ابری ۱ ترابایت', categoryId: '4', category: 'Digital Downloads', summary: '1TB cloud storage plan.', description: '<p>Sync and share files anywhere.</p>', images: [PRODUCT_IMAGE], tags: ['cloud'], status: 'active' },
  { nameEn: 'Mobile Fitness App', nameFa: 'اپلیکیشن تناسب اندام', categoryId: '2', category: 'Mobile Apps', summary: 'Workout and nutrition tracker.', description: '<p>Personalized fitness programs.</p>', images: [PRODUCT_IMAGE], tags: ['fitness', 'health'], status: 'active' },
  { nameEn: '3D Icon Bundle', nameFa: 'بسته آیکون سه‌بعدی', categoryId: '6', category: 'Templates & Assets', summary: 'Premium 3D icon collection.', description: '<p>PNG and SVG formats included.</p>', images: [PRODUCT_IMAGE], tags: ['icons', '3d'], status: 'draft' },
  { nameEn: 'Console Racing Game', nameFa: 'بازی مسابقه‌ای کنسول', categoryId: '10', category: 'Console Games', summary: 'High-speed racing experience.', description: '<p>Tracks, cars and multiplayer modes.</p>', images: [PRODUCT_IMAGE], tags: ['racing', 'game'], status: 'active' },
  { nameEn: 'Video Editing Course', nameFa: 'دوره تدوین ویدیو', categoryId: '5', category: 'E-books & Courses', summary: 'Learn professional video editing.', description: '<p>Step-by-step video tutorials.</p>', images: [PRODUCT_IMAGE], tags: ['course', 'video'], status: 'active' },
  { nameEn: 'Desktop Antivirus Pro', nameFa: 'آنتی‌ویروس دسکتاپ', categoryId: '3', category: 'Desktop Software', summary: 'Complete system protection.', description: '<p>Real-time threat detection and removal.</p>', images: [PRODUCT_IMAGE], tags: ['security', 'antivirus'], status: 'active' },
]

export const dummyProducts: Product[] = catalog.map((item, index) => ({
  id: String(index + 1),
  ...item,
  image: PRODUCT_IMAGE,
  thumbnail: PRODUCT_IMAGE,
  commentCount: [3, 12, 0, 7, 24, 5, 1, 18, 9, 0, 14, 6, 21, 4, 11, 2, 8, 16, 0, 13, 7, 19, 3, 10][index] ?? 0,
}))

export const PRODUCTS_PER_PAGE = 24

export function getProductById(id: string): Product | undefined {
  return dummyProducts.find((p) => p.id === id)
}
