// frontend/src/modals/products/DeleteProductModal.jsx

import ConfirmDialog from '@/components/ui/ConfirmDialog'

export default function DeleteProductModal({ product, onConfirm, onCancel, loading }) {
  return (
    <ConfirmDialog
      open={!!product}
      onClose={onCancel}
      onConfirm={onConfirm}
      title="Delete Product"
      message={
        product
          ? `Permanently delete "${product.name}"? This cannot be undone.`
          : ''
      }
      confirmLabel="Delete Product"
      cancelLabel="Cancel"
      variant="danger"
      loading={loading}
      persistent={loading}
    />
  )
}
