import { Injectable } from '@angular/core';
import { Activity } from '@msfa-models/activity.model';
import { GemensamPlaneringPostRequest } from '@msfa-models/api/gemensam-planering.request.model';
import { DeltagareAvrop } from '@msfa-models/avrop.model';
import { GemensamPlaneringApiService } from '@msfa-services/api/gemensam-planering-api.service';
import { Observable } from 'rxjs';

@Injectable()
export class GemensamPlaneringFormService {
  public activities$: Observable<Activity[]> = this.gemensamPlaneringApiService.fetchActivities$();

  constructor(private gemensamPlaneringApiService: GemensamPlaneringApiService) {}

  public fetchAvropInformation$(genomforandeReferens: number): Observable<DeltagareAvrop> {
    return this.gemensamPlaneringApiService.fetchAvropInformation$(genomforandeReferens);
  }

  public postGemensamPlanering$(requestData: GemensamPlaneringPostRequest): Observable<void> {
    return this.gemensamPlaneringApiService.postGemensamPlanering$(requestData);
  }
}
