import { EventEmitter } from "./lib/event-emitter.js";
const _Content = class _Content extends EventEmitter {
  constructor(content, services) {
    super();
    this.content = content;
    this.services = services;
  }
  resolve(resolver) {
    return resolver(this.content, this.services, this.editor);
  }
  //TODO: should be removed
  forceUpdate() {
    this.update(this.content, this.editor);
  }
  update(content, editor) {
    this.content = content;
    this.editor = editor;
    this.emit(_Content.EVENTS.contentChangeEvent);
  }
  get value() {
    return this.content;
  }
  isEmpty() {
    return !!this.content;
  }
  static create(content, services) {
    return new _Content(content, services);
  }
};
_Content.EVENTS = {
  contentChangeEvent: "contentChange"
};
let Content = _Content;
export {
  Content
};
//# sourceMappingURL=content.js.map
