import React from "react";
import "./ItemModal.css";
const ItemModal = ({
item,
onClose,
onEquip,
onUnequip,
isEquipped,
getStatIcon,
formatStatName,
}) => {
if (!item) return null;
return (
e.stopPropagation()}>
{item.displayName || item.name}
{item.rarity}
{item.description}
{item.stats &&
Object.entries(item.stats).map(([statName, value]) => (
{" "}
{formatStatName
? formatStatName(statName)
: statName.toUpperCase()}
+{value}
))}
{isEquipped ? (
) : (
item.canEquip && (
)
)}
);
};
export default ItemModal;