1// SPDX-License-Identifier: GPL-2.0-only
2// Copyright (c) 2025-present FERS Contributors (see AUTHORS.md).
10} from '@mui/material';
11import ViewInArIcon from '@mui/icons-material/ViewInAr';
12import WidgetsIcon from '@mui/icons-material/Widgets';
13import PlayArrowIcon from '@mui/icons-material/PlayArrow';
14import BarChartIcon from '@mui/icons-material/BarChart';
15import SettingsIcon from '@mui/icons-material/Settings';
17interface AppRailProps {
19 onViewChange: (view: string) => void;
20 onSettingsClick: () => void;
24 { id: 'scenario', label: 'Scenario Builder', icon: <ViewInArIcon /> },
25 { id: 'assets', label: 'Asset Library', icon: <WidgetsIcon /> },
26 { id: 'simulation', label: 'Simulation Run', icon: <PlayArrowIcon /> },
27 { id: 'results', label: 'Results Analysis', icon: <BarChartIcon /> },
30export default function AppRail({
39 height: '100%', // Use percentage instead of vh
41 flexDirection: 'column',
44 borderColor: 'divider',
45 bgcolor: 'background.paper',
47 overflow: 'hidden', // Prevent overflow
50 <List sx={{ flexGrow: 1, overflow: 'auto', width: '100%' }}>
51 {views.map((view) => (
52 <Tooltip title={view.label} placement="right" key={view.id}>
54 selected={activeView === view.id}
55 onClick={() => onViewChange(view.id)}
58 justifyContent: 'center',
61 backgroundColor: 'action.selected',
65 <ListItemIcon sx={{ minWidth: 0 }}>
73 <Tooltip title="Settings" placement="right">
75 onClick={onSettingsClick}
76 sx={{ my: 1, justifyContent: 'center' }}
78 <ListItemIcon sx={{ minWidth: 0 }}>