import { Link } from "@tanstack/react-router"; import { useFormatters } from "../hooks/useFormatters"; interface SetupCardProps { id: number; name: string; visibility?: "private" | "link" | "public"; itemCount: number; totalWeight: number; totalCost: number; } export function SetupCard({ id, name, visibility, itemCount, totalWeight, totalCost, }: SetupCardProps) { const { weight, price } = useFormatters(); return (

{name}

{visibility && visibility !== "private" && ( {visibility === "public" ? "Public" : "Link"} )}
{itemCount} {itemCount === 1 ? "item" : "items"}
{weight(totalWeight)} {price(totalCost)}
); }