import {Play,Pause,ChevronLeft,ChevronRight,Eye,RotateCcw} from 'lucide-react'; import {motionTitle,motionValue,type MotionJoint} from './motion'; type Props={joints:MotionJoint[];index:number;progress:number;playing:boolean;highlighted:boolean; onSelect:(index:number)=>void;onProgress:(value:number)=>void;onPlay:()=>void;onReset:()=>void;onHighlight:()=>void}; export default function MotionControls({joints,index,progress,playing,highlighted,onSelect,onProgress,onPlay,onReset,onHighlight}:Props){ const joint=joints[index],title=motionTitle(joint,index); return
{joints.length>1&&}
{title}{joint.type==='prismatic'?'Sliding':'Rotation'}{joints.length>1?` · ${index+1} of ${joints.length}`:''}
{joints.length>1&&}
{motionValue(joint,0)} onProgress(+event.target.value)}/> {motionValue(joint,1)}

{highlighted?'Highlighted part':'Selected part'} {joint.type==='prismatic'?'slides':'rotates'} · {motionValue(joint,progress)}{joint.partial?' · preview range':''}

; }