/* * Copyright (C) Contributors to the Suwayomi project * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at https://mozilla.org/MPL/2.0/. */ import type { MigrationEntryStatus, TMigrationEntry } from '@/features/migration/Migration.types.ts'; import type { ButtonProps } from '@mui/material/Button'; import Button from '@mui/material/Button'; import Collapse from '@mui/material/Collapse'; import Stack from '@mui/material/Stack'; import {} from 'react'; import ExpandMoreIcon from '@mui/icons-material/ExpandMore'; import ExpandLessIcon from '@mui/icons-material/ExpandLess'; import { MigrationEntry } from '@/features/migration/components/migration-entry/MigrationEntry.tsx'; import { MigrationManager } from '@/features/migration/MigrationManager.ts'; export const MigrationEntryGroup = ({ status, title, entries, color, isMigrating = false, }: { status: MigrationEntryStatus; title: string; entries: TMigrationEntry[]; color: ButtonProps['color']; isMigrating?: boolean; }) => { const isExpanded = MigrationManager.useGroupExpandState(status); if (!entries.length) { return null; } return ( {entries.map((entry) => ( ))} ); };