import { Box, Plus, Trash2 } from 'lucide-react'; import { useStore } from 'zustand'; import { ContainerGroup } from '@/react/azure/types'; import { Authorized } from '@/react/hooks/useUser'; import { confirmDeletionAsync } from '@/portainer/services/modal.service/confirm'; import { Datatable } from '@@/datatables'; import { Button } from '@@/buttons'; import { Link } from '@@/Link'; import { createPersistedStore } from '@@/datatables/types'; import { useSearchBarState } from '@@/datatables/SearchBar'; import { columns } from './columns'; const tableKey = 'containergroups'; const settingsStore = createPersistedStore(tableKey, 'name'); export interface Props { dataset: ContainerGroup[]; onRemoveClick(containerIds: string[]): void; } export function ContainersDatatable({ dataset, onRemoveClick }: Props) { const settings = useStore(settingsStore); const [search, setSearch] = useSearchBarState(tableKey); return ( container.id} emptyContentLabel="No container available." renderTableActions={(selectedRows) => ( <> )} /> ); async function handleRemoveClick(containerIds: string[]) { const confirmed = await confirmDeletionAsync( 'Are you sure you want to delete the selected containers?' ); if (!confirmed) { return null; } return onRemoveClick(containerIds); } }