"use client"; import Image from "next/image"; interface ProductCardProps { name: string; category: string; categoryColor: "blue" | "green" | "purple"; iconType: "us-flag-1" | "hk-flag" | "us-flag-2"; yieldAPY: string; poolCap: string; maturity: string; risk: string; riskLevel: 1 | 2 | 3; lockUp: string; circulatingSupply: string; poolCapacityPercent: number; onInvest?: () => void; } export default function ProductCard({ name, category, categoryColor, iconType, yieldAPY, poolCap, maturity, risk, riskLevel, lockUp, circulatingSupply, poolCapacityPercent, onInvest, }: ProductCardProps) { const getCategoryStyle = () => { switch (categoryColor) { case "blue": return "bg-[rgba(59,130,246,0.1)] border-[rgba(59,130,246,0.3)]"; case "green": return "bg-[rgba(34,197,94,0.1)] border-[rgba(34,197,94,0.3)]"; case "purple": return "bg-[rgba(168,85,247,0.1)] border-[rgba(168,85,247,0.3)]"; default: return "bg-[rgba(59,130,246,0.1)] border-[rgba(59,130,246,0.3)]"; } }; const getRiskBarColor = () => { switch (riskLevel) { case 1: return "#10b981"; // green case 2: return "#f59e0b"; // yellow/orange case 3: return "#ef4444"; // red default: return "#9ca3af"; } }; const getIconSrc = () => { switch (iconType) { case "us-flag-1": return "/frame-9230.svg"; case "hk-flag": return "/hk0.svg"; case "us-flag-2": return "/frame-9231.svg"; default: return "/frame-9230.svg"; } }; return (