// Display PTZ Operator Badge // Purpose: Gives the physical /display page a simple, always-readable indicator // for who currently owns the single PTZ camera turn. // Scope: This is intentionally display-only chrome; PTZ ownership, naming, and // permission rules stay in the server session state that every client already receives. import { useSessionSelector } from '../../../context/SessionContext.jsx'; export default function DisplayPtzOperatorBadge() { const ptz = useSessionSelector((state) => state.session?.ptzCamera || null); const operatorLabel = String(ptz?.operatorLabel || '').trim(); if (!ptz?.enabled || !operatorLabel) { /* The display should stay clean when nobody has the camera. Returning null instead of showing "none" makes the badge behave like a popup: it appears only for an active PTZ operator and disappears as soon as the turn ends. */ return null; } return ( ); }