import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { BaseService } from '../../base/base-service';

@Injectable({
  providedIn: 'root'
})
export class UserCountersService extends BaseService {

  constructor(
    public http: HttpClient
  ) {
    super('/v1/permission/counters', http)
   }

  getByInfo(id){
    return this.http.get(`${this.fullUrl}_by_information/${id}`)
  }

  getCounterSummary(CounterNo, CounterId, Period){
    return this.http.get(`${this.prefix}/v1/permission/counter_summary_by_period/${CounterNo}/${CounterId}/${Period}`)
  }

  logout(pin){
    return this.http.put(`${this.prefix}/v1/permission/counter_logout/${pin}`, null);
  }
}
