import { __, sprintf } from '@wordpress/i18n';
import type { JSX } from 'react';
import type { Counts } from '../../shared/api/types/status';
import { formatNumber } from '../../shared/lib/numbers';
import { setParams } from '../../shared/lib/router';
import { Button } from '../../shared/ui/Button';
import type { LinksFilter } from './linksFilter';
type FixAllButtonProps = {
activeFilter: LinksFilter;
counts: Counts;
};
export function FixAllButton( {
activeFilter,
counts,
}: FixAllButtonProps ): JSX.Element {
if ( activeFilter === 'moved' ) {
return (
<>
{ counts.moved > 0 && (
) }
>
);
}
return (
<>
{ activeFilter !== 'blocked' && counts.broken > 0 && (
) }
>
);
}