"use strict";

export class OptionProcessorsStore {
  optionsProcessorsByObjectPath = {};
  addProcessor(optionPath, processor) {
    if (!this.optionsProcessorsByObjectPath[optionPath]) this.optionsProcessorsByObjectPath[optionPath] = [];
    this.optionsProcessorsByObjectPath[optionPath].push(processor);
    return {
      remove: () => this.removeProcessor(optionPath, processor)
    };
  }
  getProcessors(optionPath) {
    return this.optionsProcessorsByObjectPath[optionPath];
  }
  removeProcessor(optionPath, processor) {
    this.optionsProcessorsByObjectPath[optionPath].splice(this.optionsProcessorsByObjectPath[optionPath].indexOf(processor));
  }
}
//# sourceMappingURL=OptionProcessorsStore.js.map