2025-08-13 15:54:39 +01:00
|
|
|
import React from 'react';
|
2025-08-14 11:00:47 +01:00
|
|
|
import { Stack, Group, ActionIcon, Text } from '@mantine/core';
|
2025-08-13 15:54:39 +01:00
|
|
|
import ChevronLeftIcon from '@mui/icons-material/ChevronLeft';
|
|
|
|
import ChevronRightIcon from '@mui/icons-material/ChevronRight';
|
|
|
|
|
|
|
|
export interface NavigationControlsProps {
|
|
|
|
currentIndex: number;
|
|
|
|
totalFiles: number;
|
|
|
|
onPrevious: () => void;
|
|
|
|
onNext: () => void;
|
|
|
|
}
|
|
|
|
|
|
|
|
const NavigationControls = ({
|
|
|
|
currentIndex,
|
|
|
|
totalFiles,
|
|
|
|
onPrevious,
|
|
|
|
onNext,
|
|
|
|
}: NavigationControlsProps) => {
|
|
|
|
if (totalFiles <= 1) return null;
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Stack align="center" gap="xs" mt="xs">
|
|
|
|
<Group justify="center" gap="xs">
|
|
|
|
<ActionIcon
|
|
|
|
variant="light"
|
|
|
|
size="sm"
|
|
|
|
onClick={onPrevious}
|
|
|
|
disabled={totalFiles <= 1}
|
|
|
|
data-testid="review-panel-prev"
|
|
|
|
>
|
|
|
|
<ChevronLeftIcon style={{ fontSize: '1rem' }} />
|
|
|
|
</ActionIcon>
|
2025-08-14 11:00:06 +01:00
|
|
|
<Text size="xs" c="dimmed">
|
|
|
|
{currentIndex + 1} of {totalFiles}
|
|
|
|
</Text>
|
2025-08-13 15:54:39 +01:00
|
|
|
|
|
|
|
<ActionIcon
|
|
|
|
variant="light"
|
|
|
|
size="sm"
|
|
|
|
onClick={onNext}
|
|
|
|
disabled={totalFiles <= 1}
|
|
|
|
data-testid="review-panel-next"
|
|
|
|
>
|
|
|
|
<ChevronRightIcon style={{ fontSize: '1rem' }} />
|
|
|
|
</ActionIcon>
|
|
|
|
</Group>
|
|
|
|
</Stack>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
2025-08-14 11:00:06 +01:00
|
|
|
export default NavigationControls;
|