import { useState } from 'react'; import { Settings, ChevronDown, ChevronUp } from 'lucide-react'; import type { PrintOptionsProps, PrintOptions as PrintOptionsType } from './types'; const PRINT_OPTIONS_CONFIG = [ { key: 'bed_levelling', label: 'Bed Levelling', desc: 'Auto-level bed before print' }, { key: 'flow_cali', label: 'Flow Calibration', desc: 'Calibrate extrusion flow' }, { key: 'vibration_cali', label: 'Vibration Calibration', desc: 'Reduce ringing artifacts' }, { key: 'layer_inspect', label: 'First Layer Inspection', desc: 'AI inspection of first layer' }, { key: 'timelapse', label: 'Timelapse', desc: 'Record timelapse video' }, ] as const; /** * Print options toggle panel with collapsible UI. * Shows bed levelling, flow/vibration calibration, layer inspection, and timelapse options. */ export function PrintOptionsPanel({ options, onChange, defaultExpanded = false, }: PrintOptionsProps) { const [isExpanded, setIsExpanded] = useState(defaultExpanded); const handleToggle = (key: keyof PrintOptionsType) => { onChange({ ...options, [key]: !options[key] }); }; return (