import { App, BlueRain } from '../index'; import { MaybeEsModule } from '../typings'; import MapRegistry from './MapRegistry'; import React from 'react'; /** * All system apps are stored in this registry * @property {Map} data Map(immutablejs) of all apps */ declare class AppRegistry extends MapRegistry { private BR; constructor(BR: BlueRain); /** * Register an App * @param {App} app The BlueRain app to register */ add(app: MaybeEsModule): void; add(key: string, app: MaybeEsModule): void; /** * Replace an item in the Registry. * * @param {string} key The key of the item * @param {App} app The app to add */ set(app: MaybeEsModule): void; set(key: string, app: MaybeEsModule): void; /** * Register many apps at once * @param {Array} apps The BlueRain apps to register */ registerMany(apps: Array>): void; /** * Initialize all the registered apps */ initializeAll(): void; /** * Returns the JSON schema of the main APPs component. * This component renders all the routes of apps. * * @returns {Object} JSON Schema */ getAllRoutes(): any[]; /** * Returns a React Element of an app's icon * @param {string} slug The slug of the app with which it is registered * @param {object} props The props that are passed to the element * * @returns {React.ReactElement | null} */ getIconElement(slug: string, props?: { size?: number; [key: string]: any; }): React.ReactElement | null; /** * Returns a plugin slug, or generates one * * @param {Plugin} plugin * @returns {string} */ createSlug(app: App): string; /** * Takes an app, adds necessary fields and returns the processed app with a key * @param key * @param app */ private getKeyAndItem; } export default AppRegistry;