import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { Observable } from 'rxjs';
import { environment } from 'src/environments/environment';

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


  baseUrl: string = environment.serviceUrl;

  constructor(private httpClient: HttpClient) { }

  
  Get_all(): Observable<any> {
    return this.httpClient.get<any>(this.baseUrl + 'api/FrequencyApi/Getall', {  observe: 'response' });
  }
  Edit_frequency(data:any[]):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/FrequencyApi/Edit_frequency', data,  { observe: 'response' });
  } 
  Active_frequency(data:any[]):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/FrequencyApi/Active_frequency', data,  { observe: 'response' });
  }

  Add_frequency(data:any[]):Observable<any>{
    return this.httpClient.post<any>(this.baseUrl + 'api/FrequencyApi/Add_frequency', data,  { observe: 'response' });
  }
  
}
