import { FolderTree, PlusCircle, Package, Settings, Tag } from 'lucide-react'
import { SectionCard } from '../components/SectionCard'
import { ProductActivityChart } from '../components/ProductActivityChart'
import { Breadcrumbs } from '../components/Breadcrumbs'
import styles from '../components/PageContent.module.css'

const productSections = [
  {
    icon: Package,
    title: 'My Products',
    description: 'View, edit and manage all your existing products.',
    linkText: 'View products',
    href: '/products/list',
  },
  {
    icon: PlusCircle,
    title: 'Add a New Product',
    description: 'Create and publish a new product to your store.',
    linkText: 'Add product',
    href: '/products/new',
  },
  {
    icon: FolderTree,
    title: 'Categories',
    description: 'Organize your products into categories and subcategories.',
    linkText: 'View categories',
    href: '/products/categories',
  },
  {
    icon: Tag,
    title: 'Brands',
    description: 'Manage product brands and assign them when creating products.',
    linkText: 'View brands',
    href: '/products/brands',
  },
  {
    icon: Settings,
    title: 'Settings',
    description: 'Configure product defaults, variants and display options.',
    linkText: 'View settings',
    href: '/products/settings',
  },
]

export function ProductsPage() {
  return (
    <main className={styles.content}>
      <Breadcrumbs
        items={[
          { label: 'Dashboard', href: '/' },
          { label: 'Products' },
        ]}
      />
      <div className={styles.pageHeader}>
        <div>
          <h2 className={styles.pageTitle}>Products</h2>
          <p className={styles.pageSubtitle}>
            Manage your products, inventory and categories.
          </p>
        </div>
      </div>

      <div className={styles.gridHome}>
        {productSections.map((section) => (
          <SectionCard key={section.title} {...section} />
        ))}
      </div>

      <div className={styles.grid12}>
        <div className={styles.col6}>
          <ProductActivityChart />
        </div>
      </div>
    </main>
  )
}
