import { type ReactNode } from "react"; import ChannelLink from "./ChannelLink"; // The presentation shared by the channel manager's "excluded channel" tabs — Hidden and Blocked. // A responsive grid of proper channel cards (avatar + name + open-on-YouTube, via ChannelLink) each // with one reversing action, instead of a bare row of name chips. Both tabs pass the same shape; only // the header icon/label, the action, and the copy differ. export interface ExcludedChannel { id: string; title: string | null; handle?: string | null; thumbnail_url: string | null; } export default function ExcludedChannelList({ channels, icon, title, hint, emptyText, actionLabel, actionIcon, onAction, onView, }: { channels: ExcludedChannel[]; icon: ReactNode; title: string; hint: string; emptyText: string; actionLabel: string; actionIcon: ReactNode; onAction: (id: string) => void; onView?: (c: ExcludedChannel) => void; }) { if (channels.length === 0) return

{emptyText}

; return ( <>
{icon} {title}
{channels.map((c) => (
onView(c) : undefined} />
))}

{hint}

); }