/** * @file Debug Mode Utility * @description Provides debug mode checking for non-React contexts * * This utility allows checking the debug-mode feature flag in non-React * files like ErrorReporter, system initialization, and other services. * * The utility checks: * 1. Runtime flag state from the feature flag provider (if initialized) * 2. Default flag value from configuration * 3. Falls back to NODE_ENV check */ /** * Called by FeatureFlagProvider when it initializes * @internal */ export declare function _setFlagProviderInitialized(flags: Record): void; /** * Called by FeatureFlagProvider when flags are updated * @internal */ export declare function _updateRuntimeFlags(flags: Record): void; /** * Called by FeatureFlagProvider when it unmounts (for testing) * @internal */ export declare function _resetFlagProvider(): void; /** * Check if debug mode is enabled. * * This function can be safely called from anywhere, including: * - Service initialization * - Error reporters * - Store configuration * - Utility functions * * Resolution order: * 1. Runtime flags (if provider is initialized) * 2. Default flag configuration value * 3. NODE_ENV === 'development' (ultimate fallback) * * @returns True if debug mode is enabled * * @example * ```typescript * import { isDebugModeEnabled } from '@/lib/flags/debug-mode'; * * if (isDebugModeEnabled()) { * console.debug('[Debug]', detailedInfo); * } * ``` */ export declare function isDebugModeEnabled(): boolean; /** * Check if a specific feature flag is enabled (non-React utility). * * For most cases, prefer using the `useFeatureFlag` hook in React components. * This utility is for service-level code that runs outside React. * * @param flagKey - The feature flag key to check * @returns True if the flag is enabled * * @example * ```typescript * import { isFlagEnabled } from '@/lib/flags/debug-mode'; * * if (isFlagEnabled('analytics-v2')) { * sendToNewAnalytics(event); * } * ``` */ export declare function isFlagEnabled(flagKey: string): boolean; /** * Check if development mode (based on NODE_ENV only). * * Use this for build-time decisions that shouldn't be controlled by flags. * For runtime debug toggling, use `isDebugModeEnabled()` instead. * * @returns True if NODE_ENV is 'development' */ export declare function isDevelopmentEnv(): boolean;