'use client'; import type { LootInventory } from '@/lib/game/types'; // For backward compatibility type LootInventoryType = LootInventory; import { LOOT_DROPS } from '@/lib/game/data/loot-drops'; import { RARITY_CSS_VAR, RARITY_GLOW_CSS_VAR } from './types'; import { Sparkles, Trash2 } from 'lucide-react'; import { ActionButton } from '@/components/ui/action-button'; interface MaterialItemProps { materialId: string; count: number; onDelete?: (materialId: string) => void; } export function MaterialItem({ materialId, count, onDelete }: MaterialItemProps) { const drop = LOOT_DROPS[materialId]; if (!drop) return null; const rarityColor = RARITY_CSS_VAR[drop.rarity] || 'var(--rarity-common)'; const rarityGlow = RARITY_GLOW_CSS_VAR[drop.rarity] || 'var(--rarity-common-glow)'; return (