import { Injectable } from '@angular/core';
import { SignalRequest } from '@msfa-models/api/signal.request.model';
import { DeltagareAvrop } from '@msfa-models/avrop.model';
import { DeltagareApiService } from '@msfa-services/api/deltagare.api.service';
import { SignalApiService } from '@msfa-services/api/signal.api.service';
import { Observable } from 'rxjs';

@Injectable()
export class SignalFormService {
  constructor(private signalApiService: SignalApiService, private deltagareApiService: DeltagareApiService) {}

  public postSignal$(requestData: SignalRequest): Observable<void> {
    return this.signalApiService.postSignal$(requestData);
  }

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