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

@Injectable({
    providedIn: 'root'
})
export class TestingRegisterEnrollmentService extends BaseService {
    constructor(
        public http: HttpClient
    ) {
        super(`/${environment.apiVersion}/enrollment/testing_registers`,http);
        super.fullUrl = `${environment.enrollmentApi}/api/${environment.apiVersion}/enrollment`;
    }

    paid(registerUid){
        return this.http.put<Response>(`${this.fullUrl}/cancle/${registerUid}`,null);
    }

    cancle(registerUid){
        return this.http.put<Response>(`${this.fullUrl}/cancel/${registerUid}`,null);
    }

    cancleAdmin(registerUid){
        return this.http.put<Response>(`${this.prefix}/v1/register/cancel_testing_receipts/${registerUid}`,null);
    }

    deleteAdmin(registerUid){
        return this.http.delete<Response>(`${this.prefix}/v1/register/testing_registers/${registerUid}`);
    }
}


