import { useParams } from 'react-router-dom';
import { particlePath } from '@/lib/particle-path';
import { ContainerView } from '@/features/particles/container-view';

/**
 * Route-level component for /:networkId (index). The network root behaves
 * like a folder: a container of streams, folders, and loose particles.
 */
export default function NetworkRoot() {
  const { networkId } = useParams();
  if (!networkId)
    throw new Error('NetworkRoot requires a :networkId route param');

  return <ContainerView path={particlePath(networkId, [])} />;
}
