import { CheckIcon } from "@chopin/icons"; import type { Answer, Item } from "../schema"; export function ChosenList({ question, answer }: { question: Item; answer: Answer }) { if (answer.custom !== undefined && !answer.optionIds?.length) { return

{answer.custom}

; } let chosen = new Set(answer.optionIds ?? []); return (
    {question.options.map((option, index) => { let picked = chosen.has(option.id) || (!answer.optionIds && !!answer.choices?.includes(option.label)); return (
  1. {option.label} {picked && }
  2. ); })}
); }