'use client'; import { randInRange } from '@/lib/utils'; import styles from '../styles/QuantityCard.module.css'; type Props = { id: string; name: string; iconUrl: string; qty: number; randMin: number; randMax: number; onSetQty: (id: string, qty: number) => void; }; const clamp = (v: number) => Math.min(32767, Math.max(0, v)); export default function QuantityCard({ id, name, iconUrl, qty, randMin, randMax, onSetQty }: Props) { const active = qty > 0; return (