import { useState } from 'react' import { Term } from './api' import { Spinner } from './ui' // A group is either a page (clicking the head opens it — Dashboard) or a folder of // leaves (Terminal). `soon` groups are inert placeholders for the roadmap. export interface Group { id: string; label: string; icon: string; soon?: boolean; page?: boolean } interface Props { groups: Group[]; terms: Term[]; active: string | null; view: string; creating?: boolean onSelect: (id: string) => void; onView: (id: string) => void; onNew: () => void onRename: (t: Term) => void; onClose: (t: Term) => void } export default function Rail({ groups, terms, active, view, creating, onSelect, onView, onNew, onRename, onClose }: Props) { const [open, setOpen] = useState('terminal') return ( ) }