import { NetworkService } from './network-service';

const API_ADMIN_BASE_URL = process.env.REACT_APP_API_ADMIN_BASE_URL;

export default class AdminService {

    static setApplNdg = (body, callback, errCallback, queryParams) => {
        NetworkService.post(`${API_ADMIN_BASE_URL}/set-ndg`, body, callback, errCallback, queryParams);
    };

    static setApplStatus = (body, callback, errCallback, queryParams) => {
        NetworkService.post(`${API_ADMIN_BASE_URL}/set-status`, body, callback, errCallback, queryParams);
    };

    static doAmendmentReopen = (body, callback, errCallback, queryParams) => {
        NetworkService.post(`${API_ADMIN_BASE_URL}/reopen`, body, callback, errCallback, queryParams);
    };

    static doAmendmentExtend = (body, callback, errCallback, queryParams) => {
        NetworkService.post(`${API_ADMIN_BASE_URL}/extend-days`, body, callback, errCallback, queryParams);
    };

    static doSendPec = (body, callback, errCallback, queryParams) => {
        NetworkService.postMultiPart(`${API_ADMIN_BASE_URL}/send-pec`, body, callback, errCallback, queryParams);
    };

    static getAdminLog = (callback, errCallback, queryParams) => {
        NetworkService.get(`${API_ADMIN_BASE_URL}/admin-operations`, callback, errCallback, queryParams);
    };

    static getDeletedAppl = (callback, errCallback, queryParams) => {
        NetworkService.get(`${API_ADMIN_BASE_URL}/status-deleted`, callback, errCallback, queryParams);
    };

    static doPreDelete = (body, callback, errCallback, queryParams) => {
        NetworkService.delete(`${API_ADMIN_BASE_URL}/pre-delete`, body, callback, errCallback, queryParams);
    };

    static doFinalDelete = (body, callback, errCallback, queryParams) => {
        NetworkService.delete(`${API_ADMIN_BASE_URL}/def-delete`, body, callback, errCallback, queryParams);
    };
}
