/**
 * Bridge status helpers — stub. The Spinner's shimmer effect was driven by
 * bridge state; with the bridge disabled the segments default to a single
 * static block so the spinner still animates locally.
 */

export const SHIMMER_INTERVAL_MS = 100

export type BridgeStatus = 'disconnected' | 'connecting' | 'connected'

export function getBridgeStatus(): BridgeStatus {
  return 'disconnected'
}

export function buildBridgeConnectUrl(_sessionId?: string): string | null {
  return null
}

/**
 * Glimmer index for the spinner — used to highlight the leading spinner
 * frame while data is in flight. With the bridge disabled there's no
 * inflight signal so this stays at 0.
 */
export function computeGlimmerIndex(_now: number): number {
  return 0
}

/**
 * Shimmer segments for the spinner — the bridge layer normally split the
 * spinner glyph into segments based on data volumes. Stub returns a single
 * full-width segment.
 */
export function computeShimmerSegments(_now: number): Array<{
  start: number
  end: number
  intensity: number
}> {
  return [{ start: 0, end: 1, intensity: 1 }]
}
