import { Subject } from 'rxjs'; import { ConfigOptions } from './configurator.typings'; /** * @description * Service to manage options/configs for services and apps. * * @ngModule ConfiguratorModule * @publicApi */ export declare class ConfiguratorService { /** * @description * Property for listen subject dispatches * * @memberof ConfiguratorService */ readonly listener: Subject; /** * @description * Property to register options as a collection * * @memberof ConfiguratorService */ private repository; constructor(options?: ConfigOptions | undefined); /** * @description * Sets a new option/value in collection * * @param name Option key * @param value Option value * @memberof ConfiguratorService */ setOption(name: string, value: any): void; /** * @description * Get a configuration value from the collection. * * @param name Option key * @param defaults Default value if missing */ getOption(name: string, defaults?: any): O; /** * @description * Gets a tree object of options * * @param rootKey Includ root key * @param fromRoot From top object * @memberof ConfiguratorService */ getOptionTree(rootKey: string, fromRoot?: boolean): T; /** * @description * Getter Options collection * * @memberof ConfiguratorService */ get options(): ConfigOptions; /** * @description * Setter Options collection * * @memberof ConfiguratorService */ set options(opt: ConfigOptions); /** * @description * Resets options */ reset(): void; /** * @description * Verify if option name exists on the collection. * * @param name Option key */ hasOption(name: string): boolean; /** * @description * Converts a tree object keys in flat * key string in one level. * * @usageNotes * ```javascript * { * name: '', * profile: { * email: '' * } * } * ``` * to: * ```javascript * {'name': '', 'profile.email': ''} * ``` * @param config * @param key Key to append */ private flat; }