import { ClientConnection } from 'message-event-channel'; import { ISettings } from './interfaces/settings'; import { HandlerContainer } from './handler-container'; export declare const KEY = "visualization-sdk:settings"; export declare enum SETTINGS_EVENTS { GET = "visualization-sdk:settings:get", CHANGE = "visualization-sdk:settings:change" } export declare type SettingsModel = ISettings; export declare type SettingsChangeHandler = (settings: SettingsModel) => void; export declare type SettingsChangeDispose = () => void; /** * Settings class allows you to get the currently selected visualization settings in the form such as Device selected, vse URL, contentId and snapshotId and watch for changes to asynchronously update your application */ export declare class Settings { connection: ClientConnection; changeHandlerContainer: HandlerContainer; constructor(connection: ClientConnection); /** * Get more context into the visualization, such as the vse and viewing device information * * ### Example * * ```typescript * const value = await visualization.settings.get(); * * console.log(value) * ``` */ get(): Promise; /** * Sets up a listener for when the visualization settings. * * @param cb - callback function to be called any settings change. * * @returns a dispose function which removes the listener * * ### Example * * ```typescript * const dispose = visualization.settings.changed((model) => { * // handle form change * }) * ``` */ changed(cb: SettingsChangeHandler): SettingsChangeDispose; }