import { useMemo } from "react";
import { useFeatureFlags } from "./FeatureFlagsContext";
import { DEFAULT_FEATURES } from "./defaultFeatures";
/**
 *
 * @returns whether one or more flags are locally overridden
 */
export function useHasLocallyOverriddenFeatureFlags() {
    const { getFeature } = useFeatureFlags();
    return useMemo(() => Object.entries(DEFAULT_FEATURES).some(([featureId]) => {
        try {
            const val = getFeature(featureId);
            return val?.overridesRemote || val?.overriddenByEnv;
        }
        catch {
            return false;
        }
    }), [getFeature]);
}
//# sourceMappingURL=useHasOverriddenFeatureFlags.js.map