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

@Injectable()
export class StatsService {
    constructor(private http: HttpClient) { }

    getStats(data: any) {
        return this.http.post(environment.apiUrl + 'estadistica', data);
    }

    topDrivers(data: any) {
        return this.http.post(environment.apiUrl + 'estadistica/camion', data);
    }

    livePercentage(data: any) {
        return this.http.post(environment.apiUrl + 'estadistica/envivo', data);
    }
}
