import { Pencil, Trash2 } from 'lucide-react'; import type { Process } from '@core/types'; import IconButton from '../shared/IconButton'; import Badge from '../shared/Badge'; import { classifyBound } from '../shared/processUtils'; interface ProcessCardProps { process: Process; onEdit: (process: Process) => void; onRemove: (id: string) => void; } const ProcessCard = ({ process, onEdit, onRemove }: ProcessCardProps) => { const bound = classifyBound(process.bursts); const totalCpu = process.bursts.filter(b => b.type === 'cpu').reduce((a, b) => a + b.duration, 0); const totalIo = process.bursts.filter(b => b.type === 'io').reduce((a, b) => a + b.duration, 0); const boundVariant = bound === 'CPU Bound' ? 'cpu' : bound === 'I/O Bound' ? 'io' : 'balanced'; return (
{/* Color indicator */} ); }; export default ProcessCard;