import { useTranslation } from 'react-i18next'; import { ConfirmModal } from './ConfirmModal'; import { materialMismatchMessage, type MaterialMismatch } from '../utils/assignMismatch'; /** * The question asked before a spool goes into a slot of another material, as * the Assign Spool dialog and the QR assignment ask it. */ export function MaterialMismatchConfirm({ mismatch, location, isLoading, onConfirm, onCancel, }: { mismatch: MaterialMismatch; /** The slot, as the question names it. */ location: string; isLoading?: boolean; onConfirm: () => void; onCancel: () => void; }) { const { t } = useTranslation(); return (