import React from 'react'; import type { PageRef } from '../../pdf/pdfTypes'; import DropIndicator from './DropIndicator'; interface PageCardProps { page: PageRef; visualIndex: number; thumbnail?: string; selected: boolean; isDraggingCard: boolean; isBusy: boolean; isCopyDragging: boolean; showLeftLine: boolean; showRightLine: boolean; dropIndicatorColor: string; onDragStart: React.DragEventHandler; onDragEnd: React.DragEventHandler; onDragOver: React.DragEventHandler; onOpenPreview: () => void; onToggleSelect: React.MouseEventHandler; onRotateClockwise: () => void; onRotateCounterclockwise: () => void; onDelete: () => void; } const pageActionButtonStyle: React.CSSProperties = { border: 'none', borderRadius: '999px', padding: '0.15rem 0.4rem', fontSize: '0.75rem', cursor: 'pointer', }; const PageCard: React.FC = ({ page, visualIndex, thumbnail, selected, isDraggingCard, isBusy, isCopyDragging, showLeftLine, showRightLine, dropIndicatorColor, onDragStart, onDragEnd, onDragOver, onOpenPreview, onToggleSelect, onRotateClockwise, onRotateCounterclockwise, onDelete, }) => { const background = isDraggingCard ? isCopyDragging ? '#dcfce7' : '#dbeafe' : selected ? '#eff6ff' : '#f9fafb'; return (
{showLeftLine && } {showRightLine && ( )}
{thumbnail ? ( {`Page ) : (
)}
Page {page.sourcePageIndex + 1} Pos {visualIndex + 1} · Rot {page.rotation}°
); }; export default PageCard;