text: import { Injectable } from '@angular/core';
  import { Subject } from 'rxjs';
  export class DraggableItemService {
      constructor() {
          this.onCapture = new Subject();
      }
      dragStart(item) {
          this.draggableItem = item;
      }
      getItem() {
          return this.draggableItem;
      }
      captureItem(overZoneIndex, newIndex) {
          if (this.draggableItem && this.draggableItem.overZoneIndex !== overZoneIndex) {
              this.draggableItem.lastZoneIndex = this.draggableItem.overZoneIndex;
              this.draggableItem.overZoneIndex = overZoneIndex;
              this.onCapture.next(this.draggableItem);
              this.draggableItem = Object.assign({}, this.draggableItem, {
                  overZoneIndex,
                  i: newIndex
              });
          }
          return this.draggableItem;
      }
      onCaptureItem() {
          return this.onCapture;
      }
  }
  DraggableItemService.decorators = [
      { type: Injectable }
  ];
  //# sourceMappingURL=draggable-item.service.js.map