import { Injectable } from '@angular/core';
import { InformativRapportRequest } from '@msfa-models/api/informativ-rapport.request.model';
import { DeltagareAvrop } from '@msfa-models/avrop.model';
import { DeltagareApiService } from '@msfa-services/api/deltagare.api.service';
import { InformativRapportApiService } from '@msfa-services/api/informativ-rapport.api.service';
import { Observable } from 'rxjs';

@Injectable()
export class InformativRapportFormService {
  constructor(
    private informativRapportApiService: InformativRapportApiService,
    private deltagareApiService: DeltagareApiService
  ) {}

  public postInformativRapport$(requestData: InformativRapportRequest): Observable<void> {
    return this.informativRapportApiService.postInformativRapport$(requestData);
  }

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