import React, { useContext, memo } from "react"; import { Plus, RotateCcw } from "lucide-react"; import { getShortName } from "../utils/teams"; import { getPlayerPrice } from "../utils/fplLogic"; import { PlayerContext, FixturesContext } from "../PlayerContext"; // Fixed card dimensions — these are design-space pixels (before PitchView scaling). // Sized to be prominent and legible on desktop, scaling gracefully on mobile via // the PitchView scale transform. Keeps proportions consistent across devices. const CARD_W = 108; const CARD_H = 108; // photo card height only (label strip is separate, in flow below) // Badge sizing — using percentage of card width ensures badges scale proportionally // with the card rather than being fixed pixels that iOS may try to inflate. // 15% of 88px = ~13px at design scale — large enough to read and tap comfortably. const BADGE_PCT = 0.25; export const PlayerCardVisual = ({ player, isBench, captainId, viceId, handleCapChange, playerCardGWs, fixtures, activeGW, onPlayerClick, onUndo, onSolverUndo, activeChipType, }) => { if (player.isBlank) { return (