import React from 'react'; import type { PdfDownload, SplitPdfDownload, } from '../hooks/usePdfGeneratedOutputs'; interface ActionsPanelProps { hasPdf: boolean; isBusy: boolean; selectedCount: number; onSplit: () => void; onExtractSelected: () => void; onOpenSelectionAsWorkspace: () => void; onExportReordered: () => void; splitDownloads: SplitPdfDownload[]; subsetDownload: PdfDownload | null; exportDownload: PdfDownload | null; } const ActionsPanel: React.FC = ({ hasPdf, isBusy, selectedCount, onSplit, onExtractSelected, onOpenSelectionAsWorkspace, onExportReordered, splitDownloads, subsetDownload, exportDownload, }) => { const disabled = !hasPdf || isBusy; const handleExtractSelectedClick = () => { if (selectedCount === 0) return; onExtractSelected(); }; const handleOpenSelectionAsWorkspaceClick = () => { if (selectedCount === 0) return; onOpenSelectionAsWorkspace(); }; return (

Tools

Use these tools on the current in-memory document (reordered, rotated, with deletions). Nothing is uploaded to a server.

{subsetDownload && (
Subset result:{' '} Download {subsetDownload.filename}
)} {exportDownload && (
Exported document:{' '} Download {exportDownload.filename}
)} {splitDownloads.length > 0 && (
Single-page PDFs:
{splitDownloads.map((download) => ( {download.filename} ))}
)}
); }; export default ActionsPanel;