/** * @license * Copyright Akveo. All Rights Reserved. * Licensed under the MIT License. See License.txt in the project root for license information. */ import { IconPack, IconProvider } from './type'; export interface RegisteredIcon { name: string; pack: string; icon: IconProvider; } type IconProps = any; /** * This service allows to register multiple icon packs to use them later within * `` component. */ declare class RegistryService { protected packs: Map>; protected defaultPack: string; /** * Registers multiple icon packs and sets the first one as default if there is no default packs * * @param {IconPack[]} packs - array of icon packs */ register(...packs: IconPack[]): void; /** * Sets pack as default * * @param {string} name * @throws {Error} if pack is nor registered */ setDefaultIconPack(name: string): void; /** * @param {string} name * @returns {IconPack} pack by name */ getIconPack(name: string): IconPack; /** * @param {string} name - icon name * @param {string} pack - pack name * @throws {Error} if requested icon pack is not registered * @returns {RegisteredIcon} - registered icon of a requested/default pack */ getIcon(name: string, pack?: string): RegisteredIcon; /** * Registers single icon pack * * @param {IconPack} pack - icon pack to register */ protected registerIconPack(pack: IconPack): void; protected getPackOrThrow(name: string): IconPack; protected getDefaultPack(): IconPack; protected getIconFromPack(name: string, pack: IconPack, shouldThrow?: boolean): IconProvider; } export declare const IconRegistryService: RegistryService; export {};