import { Table, TableBody, TableCell, TableHead, TableHeader, TableRow } from "@/components/ui/table"; import { Edit, Trash } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Product } from "@/models/products"; interface ProductTableProps { products: Product[]; loading: boolean; onEdit: (product: Product) => void; onDelete: (productId: string) => void; // Added onDelete prop getCategoryNameById: (categoryId: string) => string; } const ProductTable = ({ products, loading, onEdit, onDelete, getCategoryNameById }: ProductTableProps) => { return (