'use client'; import React from 'react'; import { OperatorSession } from './types'; interface OperationsTopBarProps { session: OperatorSession; onSignOut: () => void; onToggleMobileSidebar: () => void; signingOut?: boolean; } export function OperationsTopBar({ session, onSignOut, onToggleMobileSidebar, signingOut = false, }: OperationsTopBarProps) { const isOwner = session.role === 'owner'; const environment = (session.environment ?? 'production').toUpperCase(); return (
{/* Left: Mobile Drawer Button + Operations Branding Title */}
MotorSignal OPS
ENV: {environment}
{/* Right: Operator Identity + Role Pill + Status + Sign Out */}
{/* Safe Identity */}
{session.identity} Current Operations Identity
{/* Role Pill */} {session.role} {/* Session Status Dot/Pill */}
Active
{/* Sign Out Action */}
); }