import { Network } from 'lucide-react';
import { useOffscaleServers } from './useOffscaleServers';
import { OFFSCALE_SECTIONS } from './shared';
import { useOffscaleSection } from './useOffscaleSection';
// Panel header for the right (headscale-view) panel. Shows the section and, crucially, which server it is
// acting on — with several registered, "delete this node" is only safe if the target is unambiguous.
export const OffscaleViewHeader = () => {
const section = useOffscaleSection();
const { active } = useOffscaleServers();
const label = OFFSCALE_SECTIONS.find((s) => s.id === section)?.label ?? 'Headscale';
return (
<>
{label}
{active && · {active.name}}
>
);
};