import { Box, Typography, IconButton, TextField, Button } from '@mui/material'; import PrintIcon from '@mui/icons-material/Print'; import type { GroupWithTasks, TaskWithSteps, StepWithNotes } from '../types'; import { CreateButtons } from '../components/CreateButtons'; interface DesktopLayoutProps { groups: GroupWithTasks[]; selectedGroup?: GroupWithTasks; selectedTask?: TaskWithSteps; selectedStep?: StepWithNotes; onGroupSelect: (group: GroupWithTasks | undefined) => void; onTaskSelect: (task: TaskWithSteps | undefined) => void; onStepSelect: (step: StepWithNotes | undefined) => void; onPrintTask?: (taskId: string, userId: string) => void; onPrintStep?: (stepId: string, userId: string) => void; onAddNote?: (content: string) => void; } export function DesktopLayout({ groups, selectedGroup, selectedTask, selectedStep, onGroupSelect, onTaskSelect, onStepSelect, onPrintTask, onPrintStep, onAddNote, }: DesktopLayoutProps) { return ( {/* Groups panel */} Groups {/* Groups List */} {groups.map((group) => ( onGroupSelect(group)} > {group.name} ))} {/* Tasks panel */} {selectedGroup && ( Tasks {selectedGroup.id > 0 && } {selectedGroup.tasks.map((task) => ( onTaskSelect(task)} sx={{ flex: 1 }}> {task.name} {onPrintTask && ( { e.stopPropagation(); onPrintTask(String(task.id), '1'); // TODO: Get real user ID }} > )} ))} )} {/* Steps panel */} {selectedTask && ( Steps {selectedTask.steps.map((step) => ( onStepSelect(step)} sx={{ flex: 1 }}> {step.name} {onPrintStep && ( { e.stopPropagation(); onPrintStep(String(step.id), '1'); // TODO: Get real user ID }} > )} ))} )} {/* Step details panel */} {selectedStep && ( {selectedStep.name} {onPrintStep && ( onPrintStep(String(selectedStep.id), '1')} // TODO: Get real user ID > )} {selectedStep.instructions} Notes ({selectedStep.notes.length}) {selectedStep.notes.map((note) => ( {note.user?.name} {note.content} ))} {onAddNote && ( )} )} ); }