import { useMonitorScope } from './shared';
import { BtopView } from './BtopView';
import { Pm2View } from './Pm2View';
import { DockerView } from './DockerView';

// Right panel — renders whichever scope the left ScopeList selected (default: bTop).
export const MonitorMain = ({ panelId: _panelId }: { panelId: string }) => {
  const [scope] = useMonitorScope();
  if (scope === 'pm2') return <Pm2View />;
  if (scope === 'docker') return <DockerView />;
  return <BtopView />;
};
