import { useRef } from 'react' import { useI18n } from '../../i18n' import { StudioPermissionModeModal } from '../commands/ui/StudioPermissionModeModal' import { StudioSessionHistoryModal } from '../commands/ui/StudioSessionHistoryModal' import type { StudioCommandPanelHandle } from '../components/StudioCommandPanel' import { PlotStudioDragOverlay } from './components/PlotStudioDragOverlay' import { PlotStudioExitConfirmModal } from './components/PlotStudioExitConfirmModal' import { PlotStudioShellHeader } from './components/PlotStudioShellHeader' import { PlotStudioWorkspace } from './PlotStudioWorkspace' import { usePlotStudioDragOverlay } from './hooks/use-plot-studio-drag-overlay' import { usePlotStudioShell } from './hooks/use-plot-studio-shell' import type { PlotStudioShellProps } from './types' export function PlotStudioShell({ onExit, isExiting }: PlotStudioShellProps) { const { t } = useI18n() const commandPanelRef = useRef(null) const shell = usePlotStudioShell() const dragOverlay = usePlotStudioDragOverlay({ commandPanelRef }) return ( <>
{dragOverlay.isDraggingImages && } shell.setConfirmExitOpen(false)} onConfirm={() => { shell.setConfirmExitOpen(false) onExit() }} /> ) }