import React from 'react'; import { CartItem as CartItemType } from '../../stores/cartStore'; import { Card } from '../ui/card'; import { Button } from '../ui/button'; import { Trash2, Tag } from 'lucide-react'; interface CartItemProps { item: CartItemType; onRemove: (id: string) => void; } export const CartItem: React.FC = ({ item, onRemove }) => { // Access product details from nested object const { product } = item; const price = item.selectedLicense ? item.selectedLicense.price : product.price; const licenseName = item.selectedLicense ? item.selectedLicense.name : 'Standard'; return ( {/* Thumbnail */}
{product.title}
{/* Info */}

{product.title}

{product.author}

{licenseName} License {product.type}
{/* Price & Actions */}
${price.toFixed(2)}
); };