import { type Schema } from '@xyo-network/sdk-protocol'; import type { CreatableModuleFactory, CreatableModuleRegistry, LabeledCreatableModuleFactory, Labels, ModuleFactoryLocatorInstance } from '../module-model/index.js'; /** * A class which encapsulates the Service Locator Pattern for Module Factories */ export declare class ModuleFactoryLocator implements ModuleFactoryLocatorInstance { protected readonly _registry: CreatableModuleRegistry; private _frozen; constructor(_registry?: CreatableModuleRegistry); /** * The current registry for the module factory */ get registry(): Readonly; static empty(): ModuleFactoryLocator; static standard(): ModuleFactoryLocator; freeze(): void; /** * Locates a module factory that matches the supplied schema and labels * @param schema The config schema for the module * @param labels The labels for the module factory * @returns A module factory that matches the supplied schema and labels or throws if one is not found */ locate(schema: Schema, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory; merge(locator: ModuleFactoryLocatorInstance): ModuleFactoryLocatorInstance; /** * Registers a single module factory (with optional tags) with the locator * @param factory The factory to register * @param labels The labels for the module factory */ register(factory: CreatableModuleFactory, labels?: Labels, primary?: boolean | Schema | Schema[]): this; /** * Registers multiple module factories with the locator * @param factories The factories to register */ registerMany(factories: CreatableModuleFactory[]): this; /** * Tries to locate a module factory that matches the supplied schema and labels * @param schema The config schema for the module * @param labels The labels for the module factory * @returns A module factory that matches the supplied schema and labels or undefined */ tryLocate(schema: Schema, labels?: Labels): CreatableModuleFactory | LabeledCreatableModuleFactory | undefined; } //# sourceMappingURL=ModuleFactoryLocator.d.ts.map