import type { EquipmentItem } from "@initiative/domain"; import { DetailPopover } from "./detail-popover.js"; import { RichDescription } from "./rich-description.js"; interface EquipmentDetailPopoverProps { readonly item: EquipmentItem; readonly anchorRect: DOMRect; readonly onClose: () => void; } function EquipmentDetailContent({ item }: Readonly<{ item: EquipmentItem }>) { return (

{item.name}

{item.traits && item.traits.length > 0 && (
{item.traits.map((t) => ( {t} ))}
)}
Level {item.level}
{item.category ? (
Category{" "} {item.category.charAt(0).toUpperCase() + item.category.slice(1)}
) : null} {item.spellName ? (
Spell {item.spellName} {item.spellRank === undefined ? "" : ` (Rank ${item.spellRank})`}
) : null}
{item.description ? ( ) : (

No description available.

)}
); } export function EquipmentDetailPopover({ item, anchorRect, onClose, }: Readonly) { return ( ); }