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 StatecodeService {
  baseUrl: string = environment.serviceUrl;

  constructor(private httpClient: HttpClient) { }

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

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