import prisma from '@/lib/prisma'
import ProductForm from '../ProductForm'

export const metadata = {
  title: 'Yeni Ürün Ekle - Admin',
}

export default async function NewProductPage() {
  const categories = await prisma.categories.findMany({
    orderBy: { order_num: 'asc' },
    select: { id: true, name_tr: true }
  })

  return (
    <div className="space-y-6">
      <h1 className="text-2xl font-bold text-gray-900">Yeni Ürün Ekle</h1>
      
      <div className="bg-white p-6 rounded-xl shadow-sm border border-gray-100 max-w-3xl">
        <ProductForm categories={categories} />
      </div>
    </div>
  )
}
