import type { CSSProperties } from 'react'; import { FLOOR_EFFECTS, FOCUS_REGIONS, IT_ROOM, KIT_LAYERS, MASCOT_ANCHORS, RACK_LED_GROUPS, STATUS_PULSES, WORKSTATION_SCREENS, toSceneRect, type ItRegion, type ItSceneState } from './it-services-scene-graph'; interface Props { focus: string | null; motion: boolean; debug?: boolean; staticMode?: boolean; pointer?: { x: number; y: number; active: boolean }; sceneState?: ItSceneState; } function isItRegion(value: string | null): value is ItRegion { return value === 'status' || value === 'helpdesk' || value === 'workstations' || value === 'racks' || value === 'deployment' || value === 'toolcart'; } function DebugBox({ id, x, y, width, height, label, depth, role }: { id: string; x: number; y: number; width: number; height: number; label: string; depth: number; role: string }) { return {label}{id} · z{depth} · {role}; } function Anchor({ id, x, y, role }: { id: string; x: number; y: number; role: string }) { return ; } export function ItServicesEnvironment({ focus, motion, debug = false, staticMode = false, pointer = { x: 0.5, y: 0.5, active: false }, sceneState = 'idle' }: Props) { if (staticMode) return null; const region = isItRegion(focus) ? focus : null; const reduced = !motion; const px = Number(((pointer.x - 0.5) * 2).toFixed(3)); const py = Number(((pointer.y - 0.5) * 2).toFixed(3)); const activeAnimations = reduced ? 0 : 38; const style = { '--it-pointer-x': px, '--it-pointer-y': py, '--it-scene-w': IT_ROOM.width, '--it-scene-h': IT_ROOM.height, } as CSSProperties; return (