import type { Observable } from '@atlassian/clientside-extensions-base'; import type { InitialAttributes, LocationsSubjectPayload, ExtensionAttributesProvider, ExtensionHandler } from './types'; /** * Registry of Client-side Extensions and Client Locations */ export default class ClientExtensionsRegistry { private isAtlassianDevModeEnabled; /** * Map of locations and their subjects. */ private locations; /** * Map of registered extensions. */ private extensions; /** * Internal cache to check which locations have received an initialization call */ private initializedLocations; /** * Map of registered handlers. */ private handlers; /** * Get a Location observable. The observer will be notified when new descriptors are available to render. */ getLocation(locationName: string): Observable; /** * Extension entry-points use this API to register their attribute providers. */ registerExtension(key: string, attributesProvider: ExtensionAttributesProvider, initialDescriptor?: InitialAttributes): void; /** * Toggles the {@link ClientExtensionsRegistry#isAtlassianDevModeEnabled} flag. * Check the {@link getLocationResources} function for more details about the dev mode. * * @since 2.1.0 * @param isEnabled */ toggleDevMode(isEnabled: boolean): void; /** * Registers a handler for web-fragments that can be referenced via the custom-elements provided since 2.1.0 * see {@link registerCustomElement} * * @since 2.1.0 */ registerHandler(identifier: string, handler: ExtensionHandler): void; /** * Retrieve a registered web-fragment handler {@link registerCustomElement} * @since 2.1.0 */ getHandler(identifier: string): ExtensionHandler | null; private createOrGetExtension; private getExtensionsByLocation; private getExtensionByKey; private updateExtensionByKey; private ensureLocationsSubject; private hasSubjectForLocation; private addExtension; private static sortByWeight; private initializeExtensionLocation; } //# sourceMappingURL=registry.d.ts.map