import React from "react"; import AxisItemRow from "./AxisItemRow"; import axisDefinitions from "../data/axisDefinitions"; // One event's applicable A/V/AVB/TC_COUNT rows, grouped together - mirrors the // guideline's "recommended order per video" (identify events -> judge A/V per // event -> AVB -> TC_COUNT), instead of the old axis-major layout. export default function EventCard({ event, annotations, onChangeField, isPractice = false, grading }) { const eventAnnotations = annotations.events[event.id]; const rows = []; if (event.axes.a) rows.push("a"); if (event.axes.v) rows.push("v"); if (event.axes.avb) rows.push("avb"); return (
{event.modalityLabel}

{event.label}

{event.definition}

{rows.map((axisId) => { const def = axisDefinitions[axisId]; const field = eventAnnotations[axisId]; return ( onChangeField(event.id, axisId, "label", value)} onChangeRationale={(value) => onChangeField(event.id, axisId, "rationale", value)} isPractice={isPractice} grading={grading && grading[axisId]} /> ); })} onChangeField(event.id, "tcCount", "value", value)} onChangeRationale={(value) => onChangeField(event.id, "tcCount", "rationale", value)} isPractice={isPractice} grading={grading && grading.tcCount} />
); }