import { type Item } from '@/lib/api';
interface ItemCardProps {
item: Item;
onEdit: () => void;
onDelete: () => void;
onMoveUp: () => void;
onMoveDown: () => void;
isFirst: boolean;
isLast: boolean;
}
export default function ItemCard({
item,
onEdit,
onDelete,
onMoveUp,
onMoveDown,
isFirst,
isLast,
}: ItemCardProps) {
return (
{/* Arrow buttons on the left */}
{/* Image on Left */}
{item.imageUrl && (

)}
{item.name}
{item.price != null && (
{new Intl.NumberFormat('pt-BR', { style: 'currency', currency: item.currency || 'BRL' }).format(item.price)}
{item.quantity > 1 && ` ยท Qtd: ${item.quantity}`}
)}
{item.price == null && item.quantity > 1 && (
Qtd: {item.quantity}
)}
{item.description && (
{item.description}
)}
);
}