/**
 * Load runtime configuration from window.__RUNTIME_CONFIG__
 * This is injected by docker-entrypoint.sh at container startup
 */
export function loadRuntimeConfig() {
  const config = (window as any).__RUNTIME_CONFIG__ || {};
  const wsProtocol = window.location.protocol === 'https:' ? 'wss' : 'ws';
  const derivedWsUrl = `${wsProtocol}://${window.location.host}`;
  return {
    apiUrl: config.API_URL || '',
    wsUrl: config.WEBSOCKET_URL || derivedWsUrl
  };
}
