/******************************************************************************** * Copyright (c) 2026 Contributors to the Eclipse Foundation * * See the NOTICE file(s) distributed with this work for additional * information regarding copyright ownership. * * This program and the accompanying materials are made available under the * terms of the Eclipse Public License 2.0 which is available at * https://www.eclipse.org/legal/epl-2.0 * * SPDX-License-Identifier: EPL-2.0 ********************************************************************************/ import { FunctionComponent } from 'react'; import { Box, Typography, Pagination, CircularProgress } from '@mui/material'; import { SearchToolbar, CountsToolbar } from '../toolbars'; import { FileTable, AutoRefresh } from '../common'; import { useAllowListTab } from '../../../hooks/scan-admin'; import { useScanContext } from '../../../context/scan-admin'; import { useTheme } from '@mui/material/styles'; /** * Allowed Files tab component that displays files that have been allowed. * Uses the useAllowListTab hook to consume context. */ export const AllowListTabContent: FunctionComponent = () => { const theme = useTheme(); const { state, actions } = useScanContext(); const { files, isLoading, fileCount, search, selection, setFilesChecked, fileActions, pagination, lastRefreshed, autoRefresh, onAutoRefreshChange, } = useAllowListTab(); return ( <> {isLoading ? ( ) : files.length === 0 ? ( No allowed files Files that have been allowed will appear here ) : ( )} {pagination.totalPages > 1 && ( pagination.goToPage(page - 1)} disabled={isLoading} color='secondary' size='large' showFirstButton showLastButton /> )} ); };