// utils/configUtils.js let __configCache; export async function getConfig() { if (__configCache) return __configCache; const res = await fetch("/config.json"); if (!res.ok) throw new Error("config.json konnte nicht geladen werden"); __configCache = await res.json(); return __configCache; } // Sync helper for debugLog (for use in event handlers etc.) let debugLogValue; export function getDebugLog() { if (debugLogValue !== undefined) return debugLogValue; // Try to read from window.__appConfig if available (set at app start) if ( typeof window !== "undefined" && window.__appConfig && typeof window.__appConfig.debugLog !== "undefined" ) { debugLogValue = !!window.__appConfig.debugLog; return debugLogValue; } // Fallback: default false return false; }