// src/components/SheetSection.jsx import React from "react"; import { styles } from "../styles/styles"; import { stylesTokens } from "../styles/theme"; /** * props: * - title: string * - entries: array * - pulseId: number | null * - onCycleStatus(entry): fn * - onToggleTag(entry): fn * - displayTag(entry): string */ export default function SheetSection({ title, entries, pulseId, onCycleStatus, onToggleTag, displayTag, }) { // --- helpers (lokal, weil sie rein UI sind) --- const getRowBg = (status) => { if (status === 1) return "rgba(255, 35, 35, 0.16)"; if (status === 2) return "rgba(0, 190, 80, 0.16)"; if (status === 3) return "rgba(140, 140, 140, 0.12)"; return "rgba(255,255,255,0.06)"; }; const getNameColor = (status) => { if (status === 1) return "#ffb3b3"; if (status === 2) return "#baf3c9"; if (status === 3) return "rgba(233,216,166,0.78)"; return stylesTokens.textMain; }; const getStatusSymbol = (status) => { if (status === 2) return "✓"; if (status === 1) return "✕"; if (status === 3) return "?"; return "–"; }; const getStatusBadge = (status) => { if (status === 2) return { color: "#baf3c9", background: "rgba(0,190,80,0.18)" }; if (status === 1) return { color: "#ffb3b3", background: "rgba(255,35,35,0.18)" }; if (status === 3) return { color: "rgba(233,216,166,0.85)", background: "rgba(140,140,140,0.14)" }; return { color: "rgba(233,216,166,0.75)", background: "rgba(255,255,255,0.08)" }; }; return (