import { __, sprintf } from '@wordpress/i18n';
import type { JSX } from 'react';
import type { Scan } from '../../shared/api/types/status';
import { PauseScanButton } from '../../shared/scan/PauseScanButton';
import { ScanProgressBar } from '../../shared/scan/ScanProgressBar';
import { linksPhrase } from '../../shared/text/countedPhrases';
function scanActivityText( scan: Scan ): string {
if ( scan.state === 'paused' ) {
return __( 'Paused', 'aiplaz-link-checkup' );
}
if ( scan.phase === 'reading' ) {
return __( 'Reading your posts and pages', 'aiplaz-link-checkup' );
}
return sprintf(
/* translators: %s: number of links, for example "3 links" */
__( 'Checking %s at a time', 'aiplaz-link-checkup' ),
linksPhrase( scan.parallel )
);
}
export function ScanProgress( { scan }: { scan: Scan } ): JSX.Element {
return (
<>