import { BeEvent } from "@bentley/bentleyjs-core"; /** @internal */ export declare type GateValue = number | boolean | string | undefined; /** A set of "gates" that can enable or disable features at runtime. * @internal */ export declare class FeatureGates { /** Event raised every time any feature changes. */ onChanged: BeEvent<(feature: string, val: GateValue) => void>; /** A map of the current set of features. */ readonly gates: Map; /** Get the value of a potentially gated feature. * @param feature The name of the feature to check. May be a "path" of period-separated feature sub-groups (e.g. "feature1.groupA.showMe"). * Feature names are case-sensitive. * @param defaultVal Optionally, value to return if feature is undefined. */ check(feature: string, defaultVal?: GateValue): GateValue; /** Gate access to a feature. * @param feature The name of the feature to gate. May be a "path" of period-separated feature sub-groups (e.g. "feature1.groupA.showMe"). * Feature names are case-sensitive. * @param val Value to set. If undefined, feature is deleted. */ setGate(feature: string, val: GateValue): void; /** Register a listener to be called whenever the value of a specific gate changes. * @param feature The name of the feature to monitor * @param monitor The listener to call when `feature` changes. Receives a single argument holding the new value of the feature (may be undefined). * @returns A function that may be called to remove the listener. * @note Use [[onChanged]] to listen to changes for *all* gates. */ addMonitor(feature: string, monitor: (val: GateValue) => void): () => void; } //# sourceMappingURL=FeatureGates.d.ts.map