{"version":3,"file":"selectors.cjs","sourceRoot":"","sources":["../src/selectors.ts"],"names":[],"mappings":";;;AAeA;;;;;;GAMG;AACH,SAAgB,kBAAkB,CAChC,KAAuC;IAEvC,MAAM,IAAI,GAAG,KAAK,CAAC,kBAAkB,CAAC,2BAA2B,CAAC;IAClE,OAAO,IAAI,KAAK,SAAS,IAAI,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,UAAU,CAAC;AACrE,CAAC;AALD,gDAKC","sourcesContent":["import { RemoteFeatureFlagControllerState } from '@metamask/remote-feature-flag-controller';\n\n/**\n * The RPC failover behavior for Infura networks, controlled by the\n * `corePlatformRpcFailoverMode` remote feature flag.\n *\n * - `disabled`: failover URLs are ignored; traffic stays on the primary\n *   endpoint.\n * - `enabled`: traffic automatically diverts to failover URLs when the primary\n *   endpoint is unavailable.\n * - `forced`: Infura endpoints that have failover URLs route all traffic to\n *   those failover URLs, bypassing Infura entirely.\n */\nexport type RpcFailoverMode = 'disabled' | 'enabled' | 'forced';\n\n/**\n * Reads the RPC failover mode from the remote feature flags, defaulting to\n * `disabled` when the flag is absent or not a recognized value.\n *\n * @param state - The remote feature flag controller state.\n * @returns The RPC failover mode.\n */\nexport function getRpcFailoverMode(\n  state: RemoteFeatureFlagControllerState,\n): RpcFailoverMode {\n  const mode = state.remoteFeatureFlags.corePlatformRpcFailoverMode;\n  return mode === 'enabled' || mode === 'forced' ? mode : 'disabled';\n}\n"]}