22
33import { emitter } from '@pascal-app/core'
44import { useViewer } from '@pascal-app/viewer'
5- import { Bot , Copy , Move , Power , Shield , Trash2 , Wrench } from 'lucide-react'
5+ import { Copy , Move , Power , Trash2 , Wrench } from 'lucide-react'
66import { type PointerEvent as ReactPointerEvent , useEffect , useMemo , useRef , useState } from 'react'
77import { useShallow } from 'zustand/react/shallow'
88import { cn } from '../../../lib/utils'
99import useEditor from '../../../store/use-editor'
10- import type { NavigationQueuedTask , NavigationRobotModel } from '../../../store/use-navigation'
10+ import type { NavigationQueuedTask } from '../../../store/use-navigation'
1111import useNavigation from '../../../store/use-navigation'
1212import navigationVisualsStore from '../../../store/use-navigation-visuals'
1313import { Tooltip , TooltipContent , TooltipTrigger } from '../primitives/tooltip'
1414
1515const PANEL_BUTTON_CLASS =
1616 'flex h-10 w-10 items-center justify-center rounded-xl border border-border/60 bg-background/70 text-muted-foreground transition-colors hover:border-border hover:bg-background hover:text-foreground disabled:cursor-not-allowed disabled:opacity-45'
1717
18- const ROBOT_MODEL_LABELS : Record < NavigationRobotModel , string > = {
19- armored : 'Armored robot' ,
20- pascal : 'Pascal robot' ,
21- }
22-
2318type TaskDragState = {
2419 clientX : number
2520 clientY : number
@@ -181,10 +176,8 @@ export function NavigationPanel() {
181176 itemMoveControllers,
182177 moveQueuedTask,
183178 removeQueuedTask,
184- robotModel,
185179 robotMode,
186180 setActiveTask,
187- setRobotModel,
188181 setRobotMode,
189182 taskQueue,
190183 } = useNavigation (
@@ -193,10 +186,8 @@ export function NavigationPanel() {
193186 itemMoveControllers : state . itemMoveControllers ,
194187 moveQueuedTask : state . moveQueuedTask ,
195188 removeQueuedTask : state . removeQueuedTask ,
196- robotModel : state . robotModel ,
197189 robotMode : state . robotMode ,
198190 setActiveTask : state . setActiveTask ,
199- setRobotModel : state . setRobotModel ,
200191 setRobotMode : state . setRobotMode ,
201192 taskQueue : state . taskQueue ,
202193 } ) ) ,
@@ -384,9 +375,6 @@ export function NavigationPanel() {
384375
385376 const robotTooltip =
386377 robotMode === 'normal' ? 'Turn robot off (manual mode).' : 'Turn robot off (task mode).'
387- const nextRobotModel = robotModel === 'pascal' ? 'armored' : 'pascal'
388- const RobotModelIcon = robotModel === 'pascal' ? Bot : Shield
389- const modelTooltip = `${ ROBOT_MODEL_LABELS [ robotModel ] } . Switch to ${ ROBOT_MODEL_LABELS [ nextRobotModel ] } .`
390378
391379 return (
392380 < div data-testid = "navigation-panel" ref = { rootRef } >
@@ -410,24 +398,6 @@ export function NavigationPanel() {
410398 </ TooltipTrigger >
411399 < TooltipContent side = "left" > { robotTooltip } </ TooltipContent >
412400 </ Tooltip >
413- < Tooltip >
414- < TooltipTrigger asChild >
415- < button
416- aria-label = { `Switch to ${ ROBOT_MODEL_LABELS [ nextRobotModel ] } ` }
417- className = { cn (
418- PANEL_BUTTON_CLASS ,
419- robotModel === 'armored' &&
420- 'border-cyan-300/50 bg-cyan-500/15 text-cyan-100 hover:border-cyan-200 hover:bg-cyan-500/20 hover:text-white' ,
421- ) }
422- data-testid = "navigation-robot-model-toggle"
423- onClick = { ( ) => setRobotModel ( nextRobotModel ) }
424- type = "button"
425- >
426- < RobotModelIcon className = "h-4 w-4" />
427- </ button >
428- </ TooltipTrigger >
429- < TooltipContent side = "left" > { modelTooltip } </ TooltipContent >
430- </ Tooltip >
431401 </ div >
432402 </ div >
433403
0 commit comments