import { Injectable, Inject } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';

import { Observable } from 'rxjs';
import { map, takeUntil } from 'rxjs/operators';
import { FixBonus } from '../model/fix-bonus.model';
import { API_BASE_URL } from 'src/modules/common/type/injection-token.type';
import { FormArray } from '@angular/forms';

@Injectable({
  providedIn: 'root'
})
export class FixBonusService {
  constructor(
    @Inject(API_BASE_URL) private apiBaseUrl: string,
    private httpClient: HttpClient
  ) {}

  public getAll(): Observable<FixBonus[]> {
    return this.httpClient.get<FixBonus[]>(`${this.apiBaseUrl}/fix_bonus`, {});
  }
}
