'use client'

import { Trash2 } from 'lucide-react'
import { deleteProduct } from './actions'

export default function DeleteButton({ id }: { id: number }) {
  return (
    <button 
      onClick={async () => {
        if (confirm('Bu ürünü silmek istediğinize emin misiniz?')) {
          await deleteProduct(id)
        }
      }}
      className="p-2 text-red-600 hover:bg-red-50 rounded-lg transition-colors" 
      title="Sil"
    >
      <Trash2 size={18} />
    </button>
  )
}
