import { Registry } from "./events"; export declare type RegistryValueType = boolean | number | string | object; export declare type RegistryValueTypeNames = "boolean" | "number" | "string" | "object"; export declare type RegistryValueTypeMapping = T extends boolean ? "boolean" : T extends number ? "number" : T extends string ? "string" : T extends object ? "object" : never; export interface RegistryKey { key: string; valueType: RegistryValueTypeMapping; fallbackKeys?: string | string[]; fallbackImports?: { [key: string]: (value: string) => ValueType; }; description?: string; requireRestart?: boolean; } export interface ValuedRegistryKey extends RegistryKey { defaultValue: ValueType; } export declare class UrlParameterParser { private readonly url; constructor(url: URL); private getParameter; getValue(key: RegistryKey, defaultValue: DV): V | DV; getValue(key: ValuedRegistryKey, defaultValue?: V): V; } export declare class UrlParameterBuilder { private parameters; setValue(key: RegistryKey, value: V): void; build(): string; } /** * Switched appended to the application via the URL. * TODO: Passing native client switches */ export declare namespace AppParameters { const Instance: UrlParameterParser; function getValue(key: RegistryKey, defaultValue: DV): V | DV; function getValue(key: ValuedRegistryKey, defaultValue?: V): V; } export declare namespace AppParameters { const KEY_CONNECT_ADDRESS: RegistryKey; const KEY_CONNECT_INVITE_REFERENCE: RegistryKey; const KEY_CONNECT_NO_SINGLE_INSTANCE: ValuedRegistryKey; const KEY_CONNECT_TYPE: ValuedRegistryKey; const KEY_CONNECT_NICKNAME: RegistryKey; const KEY_CONNECT_TOKEN: RegistryKey; const KEY_CONNECT_PROFILE: RegistryKey; const KEY_CONNECT_SERVER_PASSWORD: RegistryKey; const KEY_CONNECT_PASSWORDS_HASHED: ValuedRegistryKey; const KEY_CONNECT_CHANNEL: RegistryKey; const KEY_CONNECT_CHANNEL_PASSWORD: RegistryKey; const KEY_IPC_APP_ADDRESS: RegistryKey; const KEY_IPC_CORE_PEER_ADDRESS: RegistryKey; const KEY_MODAL_IDENTITY_CODE: RegistryKey; const KEY_MODAL_TARGET: RegistryKey; const KEY_LOAD_DUMMY_ERROR: ValuedRegistryKey; } export declare class StaticSettings { private static _instance; static get instance(): StaticSettings; protected staticValues: {}; protected constructor(_reserved?: any); static(key: RegistryKey, defaultValue: DV): V | DV; static(key: ValuedRegistryKey, defaultValue?: V): V; } export interface SettingsEvents { notify_setting_changed: { setting: string; mode: "global" | "server"; oldValue: string; newValue: string; newCastedValue: any; }; } export declare class Settings { static readonly KEY_USER_IS_NEW: ValuedRegistryKey; static readonly KEY_LOG_LEVEL: RegistryKey; static readonly KEY_DISABLE_COSMETIC_SLOWDOWN: ValuedRegistryKey; static readonly KEY_DISABLE_CONTEXT_MENU: ValuedRegistryKey; static readonly KEY_DISABLE_GLOBAL_CONTEXT_MENU: ValuedRegistryKey; static readonly KEY_DISABLE_UNLOAD_DIALOG: ValuedRegistryKey; static readonly KEY_DISABLE_VOICE: ValuedRegistryKey; static readonly KEY_DISABLE_MULTI_SESSION: ValuedRegistryKey; static readonly KEY_I18N_DEFAULT_REPOSITORY: ValuedRegistryKey; static readonly KEY_CLIENT_STATE_MICROPHONE_MUTED: ValuedRegistryKey; static readonly KEY_CLIENT_STATE_SPEAKER_MUTED: ValuedRegistryKey; static readonly KEY_CLIENT_STATE_QUERY_SHOWN: ValuedRegistryKey; static readonly KEY_CLIENT_STATE_SUBSCRIBE_ALL_CHANNELS: ValuedRegistryKey; static readonly KEY_CLIENT_STATE_AWAY: ValuedRegistryKey; static readonly KEY_CLIENT_AWAY_MESSAGE: ValuedRegistryKey; static readonly KEY_FLAG_CONNECT_DEFAULT: ValuedRegistryKey; static readonly KEY_CONNECT_ADDRESS: ValuedRegistryKey; static readonly KEY_CONNECT_PROFILE: ValuedRegistryKey; static readonly KEY_CONNECT_USERNAME: ValuedRegistryKey; static readonly KEY_CONNECT_PASSWORD: ValuedRegistryKey; static readonly KEY_FLAG_CONNECT_PASSWORD: ValuedRegistryKey; static readonly KEY_CONNECT_HISTORY: ValuedRegistryKey; static readonly KEY_CONNECT_SHOW_HISTORY: ValuedRegistryKey; static readonly KEY_CONNECT_NO_DNSPROXY: ValuedRegistryKey; static readonly KEY_CERTIFICATE_CALLBACK: ValuedRegistryKey; static readonly KEY_SOUND_MASTER: ValuedRegistryKey; static readonly KEY_SOUND_MASTER_SOUNDS: ValuedRegistryKey; static readonly KEY_SOUND_VOLUMES: RegistryKey; static readonly KEY_CHAT_FIXED_TIMESTAMPS: ValuedRegistryKey; static readonly KEY_CHAT_COLLOQUIAL_TIMESTAMPS: ValuedRegistryKey; static readonly KEY_CHAT_COLORED_EMOJIES: ValuedRegistryKey; static readonly KEY_CHAT_HIGHLIGHT_CODE: ValuedRegistryKey; static readonly KEY_CHAT_TAG_URLS: ValuedRegistryKey; static readonly KEY_CHAT_ENABLE_MARKDOWN: ValuedRegistryKey; static readonly KEY_CHAT_ENABLE_BBCODE: ValuedRegistryKey; static readonly KEY_CHAT_IMAGE_WHITELIST_REGEX: ValuedRegistryKey; static readonly KEY_CHAT_LAST_USED_EMOJI: ValuedRegistryKey; static readonly KEY_SWITCH_INSTANT_CHAT: ValuedRegistryKey; static readonly KEY_SWITCH_INSTANT_CLIENT: ValuedRegistryKey; static readonly KEY_HOSTBANNER_BACKGROUND: ValuedRegistryKey; static readonly KEY_CHANNEL_EDIT_ADVANCED: ValuedRegistryKey; static readonly KEY_PERMISSIONS_SHOW_ALL: ValuedRegistryKey; static readonly KEY_TEAFORO_URL: ValuedRegistryKey; static readonly KEY_FONT_SIZE: ValuedRegistryKey; static readonly KEY_ICON_SIZE: ValuedRegistryKey; static readonly KEY_KEYCONTROL_DATA: ValuedRegistryKey; static readonly KEY_LAST_INVITE_LINK_TYPE: ValuedRegistryKey; static readonly KEY_TRANSFERS_SHOW_FINISHED: ValuedRegistryKey; static readonly KEY_TRANSFER_DOWNLOAD_FOLDER: RegistryKey; static readonly KEY_IPC_REMOTE_ADDRESS: RegistryKey; static readonly KEY_W2G_SIDEBAR_COLLAPSED: ValuedRegistryKey; static readonly KEY_VOICE_ECHO_TEST_ENABLED: ValuedRegistryKey; static readonly KEY_RTC_EXTRA_VIDEO_CHANNELS: ValuedRegistryKey; static readonly KEY_RTC_EXTRA_AUDIO_CHANNELS: ValuedRegistryKey; static readonly KEY_RNNOISE_FILTER: ValuedRegistryKey; static readonly KEY_LOADER_ANIMATION_ABORT: ValuedRegistryKey; static readonly KEY_STOP_VIDEO_ON_SWITCH: ValuedRegistryKey; static readonly KEY_VIDEO_SHOW_ALL_CLIENTS: ValuedRegistryKey; static readonly KEY_VIDEO_FORCE_SHOW_OWN_VIDEO: ValuedRegistryKey; static readonly KEY_VIDEO_AUTO_SUBSCRIBE_MODE: ValuedRegistryKey; static readonly KEY_VIDEO_DEFAULT_MAX_WIDTH: ValuedRegistryKey; static readonly KEY_VIDEO_DEFAULT_MAX_HEIGHT: ValuedRegistryKey; static readonly KEY_VIDEO_DEFAULT_MAX_BANDWIDTH: ValuedRegistryKey; static readonly KEY_VIDEO_DEFAULT_KEYFRAME_INTERVAL: ValuedRegistryKey; static readonly KEY_VIDEO_DYNAMIC_QUALITY: ValuedRegistryKey; static readonly KEY_VIDEO_DYNAMIC_FRAME_RATE: ValuedRegistryKey; static readonly KEY_VIDEO_QUICK_SETUP: ValuedRegistryKey; static readonly KEY_INVITE_SHORT_URL: ValuedRegistryKey; static readonly KEY_INVITE_ADVANCED_ENABLED: ValuedRegistryKey; static readonly FN_LOG_ENABLED: (category: string) => RegistryKey; static readonly FN_SEPARATOR_STATE: (separator: string) => RegistryKey; static readonly FN_LOG_LEVEL_ENABLED: (category: string) => RegistryKey; static readonly FN_INVITE_LINK_SETTING: (name: string) => RegistryKey; static readonly FN_SERVER_CHANNEL_SUBSCRIBE_MODE: (channel_id: number) => RegistryKey; static readonly FN_SERVER_CHANNEL_COLLAPSED: (channel_id: number) => ValuedRegistryKey; static readonly FN_PROFILE_RECORD: (name: string) => RegistryKey; static readonly FN_CHANNEL_CHAT_READ: (id: number) => RegistryKey; static readonly FN_CLIENT_MUTED: (clientUniqueId: string) => RegistryKey; static readonly FN_CLIENT_VOLUME: (clientUniqueId: string) => RegistryKey; static readonly FN_EVENTS_NOTIFICATION_ENABLED: (event: string) => RegistryKey; static readonly FN_EVENTS_LOG_ENABLED: (event: string) => RegistryKey; static readonly FN_EVENTS_FOCUS_ENABLED: (event: string) => RegistryKey; static readonly KEYS: any[]; static initialize(): void; readonly events: Registry; private readonly cacheGlobal; private saveWorker; private updated; constructor(); getValue(key: RegistryKey, defaultValue: DV): V | DV; getValue(key: ValuedRegistryKey, defaultValue?: V): V; setValue(key: RegistryKey, value?: T): void; globalChangeListener(key: RegistryKey, listener: (newValue: T) => void): () => void; save(): void; } export declare class ServerSettings { private cacheServer; private serverUniqueId; private serverSaveWorker; private serverSettingsUpdated; private _destroyed; constructor(); destroy(): void; getValue(key: RegistryKey, defaultValue: DV): V | DV; getValue(key: ValuedRegistryKey, defaultValue?: V): V; setValue(key: RegistryKey, value?: T): void; setServer(server_unique_id: string): void; save(): void; } export declare let settings: Settings;