// Copyright (C) 2020 Intel Corporation
//
// SPDX-License-Identifier: MIT
import React from 'react';
import { Row, Col } from 'antd/lib/grid';
import Text from 'antd/lib/typography/Text';
import Progress from 'antd/lib/progress';
import Tooltip from 'antd/lib/tooltip';
import Icon from 'antd/lib/icon';
import Modal from 'antd/lib/modal';
import { ActiveInference } from 'reducers/interfaces';
interface Props {
activeInference: ActiveInference | null;
cancelAutoAnnotation(): void;
}
export default function AutomaticAnnotationProgress(props: Props): JSX.Element | null {
const { activeInference, cancelAutoAnnotation } = props;
if (!activeInference) return null;
return (
<>
Automatic annotation
{
Modal.confirm({
title: 'You are going to cancel automatic annotation?',
content: 'Reached progress will be lost. Continue?',
okType: 'danger',
onOk() {
cancelAutoAnnotation();
},
});
}}
/>
>
);
}