import { forwardRef } from "react"; import { observer } from "mobx-react"; import { IconBan, IconSparks, IconStar } from "@humansignal/icons"; import { Userpic } from "@humansignal/ui"; import { Space } from "../../common/Space/Space"; import { cn } from "../../utils/bem"; import "./AnnotationTabs.prefix.css"; export const EntityTab = observer( forwardRef( ({ entity, selected, style, onClick, bordered = true, prediction = false, displayGroundTruth = false }, ref) => { const isUnsaved = (entity.userGenerate && !entity.sentUserGenerate) || entity.draftSelected; const infoIsHidden = entity.store.hasInterface("annotations:hide-info"); return (
{ e.preventDefault(); e.stopPropagation(); if (onClick) onClick(entity, prediction); }} > {prediction && } {!infoIsHidden && (
ID {entity.pk ?? entity.id} {isUnsaved && "*"}
)} {displayGroundTruth && entity.ground_truth && ( )} {entity.skipped && }
); }, ), );