import { Injectable } from '@angular/core';
import { map } from 'rxjs/operators';
import { PastoralDomain } from '../../entity/PastoralDomain';
import { PastoralDomainService } from './pastoral-domain.service';

@Injectable({
  providedIn: 'root'
})
export class CellGroupService {

  cellGroup: PastoralDomain = null;
  constructor(private pastoralDomainService: PastoralDomainService) {

  }
  initialize() {
    return this.pastoralDomainService.getCurrentUserPastoralDomain().pipe(map(result => {
      this.cellGroup
      return result;
    }));
  }
}
