import { CurrentUserMark, Mark, MarkLocation } from '../../types/mark.ts' import styles from '../DrawPDFFields/style.module.scss' import { inPx } from '../../utils/pdf.ts' interface PdfMarkItemProps { mark: Mark handleMarkClick: (id: number) => void isEditable: boolean currentMarkValue: string currentUserMark: CurrentUserMark | null } const PdfMarkItem = ({ mark, handleMarkClick, isEditable, currentMarkValue, currentUserMark }: PdfMarkItemProps) => { const handleClick = () => isEditable && handleMarkClick(mark.id); const getMarkValue = () => ( currentUserMark?.mark.id === mark.id ? currentMarkValue : mark.value ) return (
{getMarkValue()}
) } export default PdfMarkItem