import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { Observable } from 'rxjs';
import { TipoCarga } from '../models/tipo-carga.model';

@Injectable({
  providedIn: 'root'
})
export class TipoCargaService {
  private apiUrl = 'api/tiposCarga';

  constructor(private http: HttpClient) {}

  getTiposCarga(): Observable<TipoCarga[]> {
    return this.http.get<TipoCarga[]>(this.apiUrl);
  }
}
