import { Handler, Runner, Value } from './types'; export declare const urlParams: URLSearchParams; export type SettingValue = null | Value; export type SettingFn = Runner | Handler; /** * Define all available settings and their default values here. */ export declare const settings: Record; /** * Get the value of a setting, respecting the precedence of settings (cache, URL, sessionStorage, localStorage, default). * * @param setting - The key/name of the setting to get. * @returns - The value of the setting, if it exists in the URL, sessionStorage, localStorage, or defaults. */ export declare function getOverrideFor(setting: string): SettingValue; /** * Add a setting to the settings object with a default value and define a getter/setter * that respects the precedence of settings (URL, sessionStorage, localStorage, default). * Cache all set/retrieved values in the current window for speed. * * @param setting - The key/name of the setting to add. * @param defaultValue - The default value of the setting. */ export declare function addSetting(setting: string, defaultValue?: SettingValue): void; /** * Add multiple settings at once. * * @param newSettings - An object with keys as setting names and values as default values. */ export declare function addSettings(newSettings: Record): void; /** * Registers a handler function to be called when the specified setting is set. */ export declare function onSetting(setting: string, handler: (value: SettingValue) => void): void; /** * Looks for a meta element with the key as a name and returns the content attribute * so long as it doesn't still have its #{octopus} format. Otherwise returns null. */ export declare function meta(key: string): string | null; /** * Add a convenience function to the settings object. * * @param name - The name of the function to add. * @param fn - The function to add. */ export declare function addFn(name: string, fn: SettingFn): void; /** * Add multiple convenience functions to the settings object. * * @param fns - An object with keys as function names and values as functions. */ export declare function addFns(fns: Record>): void; /** * Set the backend to a new URL and reload the page. */ export declare function setBackend(url: string): string; export declare function hideFeatures(features: SettingValue): void; export default settings;