import { BreadcrumbItem } from '../contexts/BreadcrumbContext'

// Base breadcrumb configurations for each route
// Pages can extend these with dynamic context (tabs, filters, selected items)
export const breadcrumbConfig: Record<string, BreadcrumbItem[]> = {
  '/': [
    { label: 'Home' }
  ],
  '/downloads': [
    { label: 'Home', path: '/' },
    { label: 'Downloads' }
  ],
  '/media': [
    { label: 'Home', path: '/' },
    { label: 'Media Library' }
  ],
  '/gallery': [
    { label: 'Home', path: '/' },
    { label: 'Gallery' }
  ],
  '/review': [
    { label: 'Home', path: '/' },
    { label: 'Review' }
  ],
  '/videos': [
    { label: 'Home', path: '/' },
    { label: 'Video Downloader' }
  ],
  '/celebrities': [
    { label: 'Home', path: '/' },
    { label: 'Internet Discovery' }
  ],
  '/queue': [
    { label: 'Home', path: '/' },
    { label: 'Download Queue' }
  ],
  '/video/channel-monitors': [
    { label: 'Home', path: '/' },
    { label: 'Channel Monitors' }
  ],
  '/import': [
    { label: 'Home', path: '/' },
    { label: 'Manual Import' }
  ],
  '/discovery': [
    { label: 'Home', path: '/' },
    { label: 'Discovery' }
  ],
  '/appearances': [
    { label: 'Home', path: '/' },
    { label: 'Appearances' }
  ],
  '/press': [
    { label: 'Home', path: '/' },
    { label: 'Press' }
  ],
  '/analytics': [
    { label: 'Home', path: '/' },
    { label: 'Analytics' }
  ],
  '/faces': [
    { label: 'Home', path: '/' },
    { label: 'Face Recognition' }
  ],
  '/platforms': [
    { label: 'Home', path: '/' },
    { label: 'Platforms' }
  ],
  '/scheduler': [
    { label: 'Home', path: '/' },
    { label: 'Scheduler' }
  ],
  '/health': [
    { label: 'Home', path: '/' },
    { label: 'System Health' }
  ],
  '/scrapers': [
    { label: 'Home', path: '/' },
    { label: 'Scrapers' }
  ],
  '/monitoring': [
    { label: 'Home', path: '/' },
    { label: 'Monitoring' }
  ],
  '/scraping-monitor': [
    { label: 'Home', path: '/' },
    { label: 'Scraping Monitor' }
  ],
  '/logs': [
    { label: 'Home', path: '/' },
    { label: 'Logs' }
  ],
  '/recycle-bin': [
    { label: 'Home', path: '/' },
    { label: 'Recycle Bin' }
  ],
  '/config': [
    { label: 'Home', path: '/' },
    { label: 'Configuration' }
  ],
  '/notifications': [
    { label: 'Home', path: '/' },
    { label: 'Notifications' }
  ],
  '/changelog': [
    { label: 'Home', path: '/' },
    { label: 'Change Log' }
  ],
  // Paid Content routes
  '/paid-content': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content' }
  ],
  '/paid-content/feed': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Feed' }
  ],
  '/paid-content/creators': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Creators' }
  ],
  '/paid-content/add': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Add Content' }
  ],
  '/paid-content/notifications': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Notifications' }
  ],
  '/paid-content/settings': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Configuration' }
  ],
  '/paid-content/queue': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Download Queue' }
  ],
  '/paid-content/messages': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Messages' }
  ],
  '/paid-content/analytics': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Analytics' }
  ],
  '/paid-content/watch-later': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Watch Later' }
  ],
  '/paid-content/gallery': [
    { label: 'Home', path: '/' },
    { label: 'Paid Content', path: '/paid-content' },
    { label: 'Gallery' }
  ],
  // Private Gallery routes
  '/private-gallery': [
    { label: 'Home', path: '/' },
    { label: 'Private Gallery' }
  ],
  '/private-gallery/unlock': [
    { label: 'Home', path: '/' },
    { label: 'Private Gallery', path: '/private-gallery' },
    { label: 'Unlock' }
  ],
  '/private-gallery/config': [
    { label: 'Home', path: '/' },
    { label: 'Private Gallery', path: '/private-gallery' },
    { label: 'Settings' }
  ]
}

// Helper to get breadcrumbs for a path, with fallback
export function getBreadcrumbsForPath(path: string): BreadcrumbItem[] {
  return breadcrumbConfig[path] || [
    { label: 'Home', path: '/' },
    { label: 'Unknown Page' }
  ]
}
