import React from "react"; import { styles } from "../styles/styles"; import { stylesTokens } from "../styles/theme"; export default function GamePickerCard({ games, gameId, setGameId, onOpenHelp, members = [], me, hostUserId, }) { const cur = games.find((x) => x.id === gameId); const renderMemberName = (m) => { const base = ((m.display_name || "").trim() || (m.email || "").trim() || "—"); const isMe = !!(me?.id && String(me.id) === String(m.id)); const isHost = !!(hostUserId && String(hostUserId) === String(m.id)); const suffix = `${isHost ? " " : ""}${isMe ? " (du)" : ""}`; return base + suffix; }; const pillStyle = (isHost, isMe) => ({ padding: "7px 10px", borderRadius: 999, border: `1px solid ${ isHost ? "rgba(233,216,166,0.35)" : "rgba(233,216,166,0.16)" }`, background: isHost ? "linear-gradient(180deg, rgba(233,216,166,0.14), rgba(10,10,12,0.35))" : "rgba(10,10,12,0.30)", color: stylesTokens.textMain, fontSize: 13, fontWeight: 950, boxShadow: isHost ? "0 8px 18px rgba(0,0,0,0.25)" : "none", opacity: isMe ? 1 : 0.95, display: "inline-flex", alignItems: "center", gap: 6, whiteSpace: "nowrap", }); return (