'use client'; import React from 'react'; import Link from 'next/link'; import { Club, UserPortalPermissions, ClubRole } from './types'; interface FounderTopBarProps { club: Club; permissions: UserPortalPermissions; activeNav?: string; onToggleMobileSidebar?: () => void; onPlanRide?: () => void; onPostAnnouncement?: () => void; onSwitchRole?: (role: ClubRole) => void; onSwitchClub?: () => void; } export function FounderTopBar({ club, permissions, activeNav, onToggleMobileSidebar, onPlanRide, onPostAnnouncement, onSwitchRole, onSwitchClub, }: FounderTopBarProps) { return (
{/* Left: Mobile hamburger + Breadcrumbs + Switch Club */}
{/* Mobile Hamburger Toggle */}
CLUBS / {club.name} {activeNav === 'profile' && ( <> / CLUB PROFILE )} {activeNav === 'settings' && ( <> / SETTINGS )}
{/* Middle: Search Input (desktop/tablet only) */}
search
{/* Right: Actions + Role Switcher preview pill + Notifications + Profile */}
{/* Authoritative Role Badge (Production) vs Interactive Role Switcher (Development Only) */} {process.env.NODE_ENV === 'development' ? (
DEV PREVIEW: {(['owner', 'admin', 'member'] as const).map((r) => ( ))}
) : (
{permissions.role}
)} {/* Post Announcement (Owner / Admin only) */} {permissions.canManageSettings && ( )} {/* Plan Club Ride (Owner / Admin only) */} {permissions.canPlanRides && ( )} {/* Notifications */}
{/* Account Avatar */} person
); }