/** * @file components/sidebar/ChannelItem.tsx * @description Channel item component rendering channel links with active state styling and settings action. */ "use client"; import Link from "next/link"; import { Settings } from "lucide-react"; import type { Channel } from "@/db/schema"; /** Props for the ChannelItem component. */ interface ChannelItemProps { channel: Channel; serverId: string; isActive: boolean; onChannelClick: () => void; onOpenSettings: (e: React.MouseEvent, channel: Channel) => void; } /** Renders an individual channel item link with an optional settings trigger. */ export function ChannelItem({ channel, serverId, isActive, onChannelClick, onOpenSettings, }: ChannelItemProps) { return (
# {channel.name}
{!channel.isDefault && ( )} ); }