import type { ReactNode } from 'react';
import { ChevronRight } from 'lucide-react';
// Shared visual language for the /soulseek grouped views (search results + downloads). Each top-level
// grouping (a peer/user) is an almost-black Card; each folder within it is a lifted SubCard. Kept here
// so search and downloads stay pixel-identical — change the look in one place.
export const Card = ({ children }: { children: ReactNode }) => (
{children}
);
// Supply exactly one of `title` (inert text — the whole row becomes the collapse toggle) or `titleMenu`
// (an interactive node such as the peer dropdown). A trigger can't live inside the toggle button, so with
// `titleMenu` the row splits: the chevron and the empty space after the node toggle, the node itself doesn't.
type CardHeaderProps = {
open: boolean;
onToggle: () => void;
title?: ReactNode;
meta?: ReactNode;
titleMenu?: ReactNode;
};
export const CardHeader = ({ open, onToggle, title, meta, titleMenu }: CardHeaderProps) => {
const chevron = (
);
const metaBlock = meta &&