"use client" import { Button } from "@/components/ui/button" import { PhoneIcon, SearchIcon, UserIcon, UsersIcon, VideoIcon } from "lucide-react" import UserCard from "../user/user-card" export interface PageHeaderProps { currentChannel: SiPher.Channel | null page: "friends" | "support" | "dm" | "server" friendsPage?: "all" | "available" onFriendsPageChange?: (page: "all" | "available") => void onAddFriend?: () => void dmChannel?: { id: string participantDetails: { id: string name: string username: string displayUsername: string image: string status: "online" | "busy" | "offline" | "away" }[] } serverId?: string serverChannelId?: string } export function PageHeader({ currentChannel, page, friendsPage, onFriendsPageChange, onAddFriend, dmChannel, serverId, serverChannelId, }: PageHeaderProps) { return (
{/* SCS or DM Selector */}
{!currentChannel || currentChannel.type === "DM" ? ( ) : ( {currentChannel.name} )}
{/* Page title/options */} {dmChannel ? (
{dmChannel.participantDetails[0].name}
) : serverChannelId ? (
#{serverChannelId}
) : page === "friends" ? (
Friends
) : null}
) }