import * as React from 'react'; import { faCircleExclamation } from '@fortawesome/free-solid-svg-icons/faCircleExclamation'; import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { Group, Input, SegmentedControl, Stack, Text, ThemeIcon } from '@mantine/core'; import { ELabelingOptions } from './interfaces'; interface LabelingOptionsProps { callback: (s: ELabelingOptions) => void; currentSelected: ELabelingOptions | null; labelLimit?: number; } export function LabelingOptions({ callback, currentSelected, labelLimit }: LabelingOptionsProps) { const displayLabelLimitCheck = React.useMemo(() => labelLimit > 0 && [ELabelingOptions.SELECTED].includes(currentSelected), [currentSelected, labelLimit]); return ( {displayLabelLimitCheck && ( Showing only the first {labelLimit} labels )} ); }