text: import { Injectable } from '@angular/core';
  import { BehaviorSubject, Subject } from 'rxjs';
  /**
   * A service which publishes information from the Scheduler to the views.
   * Views subscribe to changes in the context (selected date, event, and resource data) through this service.
   */
  export class ViewContextService {
      constructor() {
          this.actionSource = new Subject();
          this.itemsSource = new BehaviorSubject([]);
          this.selectedDateSource = new BehaviorSubject(null);
          this.resizeSource = new Subject();
          this.optionsChangeSource = new BehaviorSubject({});
          this.action = this.actionSource.asObservable();
          this.items = this.itemsSource.asObservable();
          this.selectedDate = this.selectedDateSource.asObservable();
          this.resize = this.resizeSource.asObservable();
          this.optionsChange = this.optionsChangeSource.asObservable();
      }
      /**
       * An internal method which is used by the Scheduler to publish unhandled navigation actions.
       *
       * @hidden
       */
      notifyAction(action) {
          this.actionSource.next(action);
      }
      /**
       * An internal method which is used by the Scheduler to publish the current set of items.
       *
       * @hidden
       */
      notifyItems(items) {
          this.itemsSource.next(items);
      }
      /**
       * An internal method which is used by the Scheduler to publish the currently selected date.
       *
       * @hidden
       */
      notifySelectedDate(date) {
          this.selectedDateSource.next(date);
      }
      /**
       * An internal method which is used by the Scheduler to notify that the size changed.
       *
       * @hidden
       */
      notifyResize() {
          this.resizeSource.next();
      }
      /**
       * An internal method which is used by the Scheduler to notify that the options changed.
       *
       * @hidden
       */
      notifyOptionsChange(changes) {
          this.optionsChangeSource.next(changes);
      }
  }
  ViewContextService.decorators = [
      { type: Injectable },
  ];
  /** @nocollapse */
  ViewContextService.ctorParameters = () => [];
  