import { Option, Participant, Vote } from "@prisma/client"; import clsx from "clsx"; import * as React from "react"; import Button from "@/components/button"; import Pencil from "@/components/icons/pencil.svg"; import Trash from "@/components/icons/trash.svg"; import { usePoll } from "@/components/poll-context"; import { useUpdateParticipantMutation } from "../mutations"; import { useDeleteParticipantModal } from "../use-delete-participant-modal"; import UserAvater from "../user-avatar"; import VoteIcon from "../vote-icon"; import ControlledScrollArea from "./controlled-scroll-area"; import ParticipantRowForm from "./participant-row-form"; import { usePollContext } from "./poll-context"; export interface ParticipantRowProps { urlId: string; participant: Participant & { votes: Vote[] }; options: Array