import { Injectable } from '@angular/core';
import {
  Http,
  Headers,
  RequestOptions,
} from '@angular/http';
import { environment } from 'src/environments/environment';
import { ConnectionService } from 'ngx-connection-service';
import { NgxSpinnerService } from 'ngx-spinner';
import { DomSanitizer, SafeResourceUrl } from '@angular/platform-browser';
import { Router } from '@angular/router';
import { LoginflowService } from './data/loginflow.service';
import { CryptoService } from '../app/services/crypto/crypto.service';
// import * as AWS from 'aws-sdk';
// import { config } from 'aws-sdk';
// const SES = new AWS.SES();
@Injectable({
  providedIn: 'root',
})
export class ServicesService {
  public ErrorPopup: boolean = false;
  public ErrorMessage: any;
  public instructionHint: boolean = false;
  public headershow: boolean = false;
  public title = '';
  courseid = '';
  public SearchValue: boolean = false;
  baseurl = environment.baseurl;
  public knnowlength = 0;
  public Studentheader = 'Student Profile';
  public access = {
    Practiceaccess: false,
    Knowaccess: false,
    CATaccess: false,
    livechat_access: false
  };
  name: '';
  public headerset = {
    dashboard: false,
    studyguuide: false,
    knowledge: false,
    knowques: false,
    knowresult: false,
    practice: false,
    cat: false,
    datestring: false,
    CATresult: false,
    CATQue: false,
    PracticeResult: false,
    Practiceques: false,
    studentprofile: false,
    resource: false,
    liveSupport: false
  };
  DateSchdule = '';
  isConnected;
  status = 'ONLINE';
  srcData: SafeResourceUrl;
  baseNonet = `data:image/jpeg;base64,/9j/4QmORXhpZgAATU0AKgAAAAgABwESAAMAAAABAAEAAAEaAAUAA
AABAAAAYgEbAAUAAAABAAAAagEoAAMAAAABAAIAAAExAAIAAAAeAAAAcgEyAAIAAAAUAAAAkIdpA
AQAAAABAAAApAAAANAACvyAAAAnEAAK/IAAACcQQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93c
ykAMjAyMTowNjowMiAxNTo1MDo1NwAAA6ABAAMAAAAB//8AAKACAAQAAAABAAAAXqADAAQAAAABA
AAARwAAAAAAAAAGAQMAAwAAAAEABgAAARoABQAAAAEAAAEeARsABQAAAAEAAAEmASgAAwAAAAEAA
gAAAgEABAAAAAE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AAAAACOEJJTQP1AAAAAABIAC9mZgABAGxmZ
gAGAAAAAAABAC9mZgABAKGZmgAGAAAAAAABADIAAAABAFoAAAAGAAAAAAABADUAAAABAC0AAAAGA
AAAAAABOEJJTQP4AAAAAABwAAD/////////////////////////////A+gAAAAA/////////////
////////////////wPoAAAAAP////////////////////////////8D6AAAAAD//////////////
///////////////A+gAADhCSU0EAAAAAAAAAgAAOEJJTQQCAAAAAAACAAA4QklNBDAAAAAAAAEBA
DhCSU0ELQAAAAAABgABAAAAAzhCSU0ECAAAAAAAEAAAAAEAAAJAAAACQAAAAAA4QklNBB4AAAAAA
AQAAAAAOEJJTQQaAAAAAANNAAAABgAAAAAAAAAAAAAARwAAAF4AAAAMAE4AbwAtAEkAbgB0AGUAc
gBuAGUAdAAxAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAABeAAAARwAAAAAAAAAAA
AAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAABAAAAABAAAAAAAAbnVsbAAAAAIAAAAGYm91bmRzT
2JqYwAAAAEAAAAAAABSY3QxAAAABAAAAABUb3AgbG9uZwAAAAAAAAAATGVmdGxvbmcAAAAAAAAAA
EJ0b21sb25nAAAARwAAAABSZ2h0bG9uZwAAAF4AAAAGc2xpY2VzVmxMcwAAAAFPYmpjAAAAAQAAA
AAABXNsaWNlAAAAEgAAAAdzbGljZUlEbG9uZwAAAAAAAAAHZ3JvdXBJRGxvbmcAAAAAAAAABm9ya
WdpbmVudW0AAAAMRVNsaWNlT3JpZ2luAAAADWF1dG9HZW5lcmF0ZWQAAAAAVHlwZWVudW0AAAAKR
VNsaWNlVHlwZQAAAABJbWcgAAAABmJvdW5kc09iamMAAAABAAAAAAAAUmN0MQAAAAQAAAAAVG9wI
GxvbmcAAAAAAAAAAExlZnRsb25nAAAAAAAAAABCdG9tbG9uZwAAAEcAAAAAUmdodGxvbmcAAABeA
AAAA3VybFRFWFQAAAABAAAAAAAAbnVsbFRFWFQAAAABAAA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hbmNlSUQ9Inhtc
C5paWQ6ODMyQzkxMzg4Q0MzRUIxMTlBNjJGMDJBNzhDMEU5MkQiIHN0RXZ0OndoZW49IjIwMjEtM
DYtMDJUMTU6NTA6NTcrMDU6MzAiIHN0RXZ0OnNvZnR3YXJlQWdlbnQ9IkFkb2JlIFBob3Rvc2hvc
CBDUzYgKFdpbmRvd3MpIiBzdEV2dDpjaGFuZ2VkPSIvIi8+IDwvcmRmOlNlcT4gPC94bXBNTTpIa
XN0b3J5PiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgI
CAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8P3hwYWNrZXQgZ
W5kPSJ3Ij8+/+4ADkFkb2JlAGRAAAAAAf/bAIQAAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBA
QEBAQEBAQEBAQEBAQEBAQICAgICAgICAgICAwMDAwMDAwMDAwEBAQEBAQEBAQEBAgIBAgIDAwMDA
wMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMD/8AAEQgARwBeAwERA
AIRAQMRAf/dAAQADP/EAaIAAAAGAgMBAAAAAAAAAAAAAAcIBgUECQMKAgEACwEAAAYDAQEBAAAAA
AAAAAAABgUEAwcCCAEJAAoLEAACAQMEAQMDAgMDAwIGCXUBAgMEEQUSBiEHEyIACDEUQTIjFQlRQ
hZhJDMXUnGBGGKRJUOhsfAmNHIKGcHRNSfhUzaC8ZKiRFRzRUY3R2MoVVZXGrLC0uLyZIN0k4Rlo
7PD0+MpOGbzdSo5OkhJSlhZWmdoaWp2d3h5eoWGh4iJipSVlpeYmZqkpaanqKmqtLW2t7i5usTFx
sfIycrU1dbX2Nna5OXm5+jp6vT19vf4+foRAAIBAwIEBAMFBAQEBgYFbQECAxEEIRIFMQYAIhNBU
QcyYRRxCEKBI5EVUqF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constructor(
    public http: Http,
    private spinner: NgxSpinnerService,
    private connectionService: ConnectionService,
    private sanitizer: DomSanitizer,
    public router: Router,
    public LoginflowService: LoginflowService, private crypto: CryptoService,
  ) {
    // config.update({
    //   secretAccessKey: this.crypto.dec(environment.ACCESS_KEY),
    //   accessKeyId: this.crypto.dec(environment.KEY_ID),
    //   region: 'us-east-2',
    //   correctClockSkew: true,
    // });
    this.srcData = this.sanitizer.bypassSecurityTrustResourceUrl(
      this.baseNonet
    );
    this.connectionService.updateOptions({
      heartbeatUrl: environment.pingurl,
    });
    this.connectionService.monitor().subscribe((isConnected) => {
      this.isConnected = isConnected.hasNetworkConnection
        ? isConnected.hasNetworkConnection
        : false;
      if (this.isConnected) {
      } else {
        this.status = 'OFFLINE';
        this.spinner.hide();
      }
    });
  }
  async ShowSuccess(success) { }
  async ShowError(error) {
    this.ErrorPopup = true;
    this.ErrorMessage = error;
  }
  async testlogs_add(user_id, test_id, test_type, action, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        user_id: user_id,
        test_id: test_id,
        test_type: test_type,
        action: action,
      }))
    };
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = this.baseurl + environment.TEST_LOGS_ADD;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async saveDiscussion(user_id, test_type, test_id, q_id, message, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        user_id: user_id,
        test_type: test_type,
        test_id: test_id,
        q_id: q_id,
        message: message,
      }))
    };
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);

      let options = new RequestOptions({ headers: headers });
      var url = this.baseurl + environment.QUEDISCUSION_ADD;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async addsupport(uid, subject, message) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        user_id: uid,
        subject: subject,
        message: message,
        app_type: 'Dashboard',
      }))
    };
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    var url = this.baseurl + environment.ADDSUPPORT;
    return new Promise((resolve) => {
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ data: res['_body'], StatusCode: 1, status: res.status }]);
        },
        (err) => {
          resolve([{ data: err, StatusCode: 0, status: err.status }]);
        }
      );
    });
  }
  async setOfflineUser(email) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        email: email,
        is_live: "0"
      }))
    };
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.USER_UPDATE_BY_EMAIL, data, options)
        .subscribe(
          (res) => {
            resolve([{ data: res, StatusCode: 1, status: res.status }]);
          },
          (err) => {
            resolve([{ data: err, StatusCode: 0, status: err.status }]);
          }
        );
    });
  }
  async getMemberhipDetail(sub_id) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        sub_id: sub_id
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.MEMBERSHIP_DETAIL, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async addUsertemp(name, email, roll_id, password, permission: number, mobile, allow_access) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        "name": name,
        "email": email,
        "roll_id": roll_id,
        "password": password,
        "permission": permission,
        "email_verified_at": false,
        "is_temp": 1,
        "mobile": mobile,
        "allow_access": allow_access.toString(),
        "is_selfpaced": 1,
        "show_resources": 1
      }))
    }
    return new Promise(async resolve => {
      await this.verifyDKIM(email).then(async (result) => {
        if (result[0].StatusCode == 1) {
          let headers = new Headers();
          headers.append('Accept', 'application/json');
          let options = new RequestOptions({ headers: headers });
          var url = environment.baseurl + environment.USER_ADD
          this.http.post(url, data, options).subscribe(
            (res) => {
              resolve([{ status: res.status, json: res["_body"] }])
            },
            (err) => {
              resolve([{ status: err.status, json: err["_body"] }]);
            }
          );
        } else {
          this.ShowError(result[0].message);
          resolve([{ message: result[0].message, StatusCode: 0, Data: "" }]);
        }
      })
    });
  }
  async getOneTimeMembershipDetail(sub_id) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        sub_id: sub_id
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.ONETIME_MEMBERSHIP_DETAIL, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async savePaymentTransaction(paymentdata) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify(paymentdata))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.PAYMENT_TRANSACTION, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async addUserAccessDuration(addUserAccess) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify(addUserAccess))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.SAVE_USER_ACCESS_DURATION, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async updateUserSelfAndCustomer(updateUserSelf) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify(updateUserSelf))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.USER_UPDATE_BY_EMAIL, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async addStudentToSelfCohort(cohort_id, user_id) {
    let data = {
      data: this.crypto.encrypt(JSON.stringify({
        cohortIds: cohort_id,
        user_id: user_id
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.ADD_SELFCOHORT_STD, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async getMembershipMaterials(method_id, method_type, material_type, token) {
    let data = {
      data: this.crypto.encrypt(JSON.stringify({
        method_id: method_id,
        method_type: method_type,
        material_type: material_type
      }))
    }
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);

      let options = new RequestOptions({ headers: headers });
      var url = this.baseurl + environment.MEMBER_MATERIAL;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async getMeeting(AttendeeId, MeetingId) {
    let data = {
      AttendeeId: AttendeeId,
      MeetingId: MeetingId
    }
    // var url = environment.BASE_URL + environment.GET_MEETING;
    var url = "https://teach.dstncert.com/chime/get_meeting.php"

    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(url, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async addAttendee(meeting_id: string, attendee_id: string, user_id: number) {
    let data = {
      meeting_id: meeting_id,
      attendee_id: attendee_id,
      user_id: user_id
    }
    var url = "https://teach.dstncert.com/chime/create_attendee.php"
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(url, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async get_welcome_links(cohort_id, email = "") {
    let data = {
      data: this.crypto.encrypt(JSON.stringify({
        cohort_id: cohort_id,
        email: email
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.GET_WELCOME_LINKS, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  async addFailedEmail(email, cohort, message, email_type, mail_success, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        "email": email,
        "cohort": cohort,
        "message": message,
        "email_type": email_type,
        "mail_success": mail_success
      }))
    }
    return new Promise(resolve => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = this.baseurl + environment.ADD_FAILED_EMAIL
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res["_body"] }])
        },
        (err) => {
          resolve([{ status: err.status, json: err["_body"] }])
        }
      );
    });
  }
  async addActivityTracker(user_id, email, cohort_id, type, description) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        "user_id": user_id,
        "email": email,
        "cohort_id": cohort_id,
        "type": type,
        "description": description
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      this.http
        .post(this.baseurl + environment.ADD_ACTIVITY_TRACKER, data, options)
        .subscribe(
          (res) => {
            resolve([{ status: res.status, json: res['_body'] }]);
          },
          (err) => {
            resolve([{ status: err.status, json: err['_body'] }]);
          }
        );
    });
  }
  verifyDKIM(email) {
    let domain = email.split("@")[1];
    let verify = {
      Domain: domain
    }
    return new Promise((resolve, reject) => {
      // SES.verifyDomainDkim(verify, (err, data) => {
      //   if (err) {
      //     resolve([{ message: err.message, StatusCode: 0 }])
      //   } else {
      //     resolve([{ message: "DKIM verification successful", StatusCode: 1 }])
      //   }
      // });
    });
  }
  async getCohortByIds(cohortIds, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        cohortIds: cohortIds,
      }))
    };
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = environment.baseurl + environment.COHORT_BY_IDS;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }

  async getStudentReport(user_id, cohort_id, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        user_id: user_id,
        cohort_id: cohort_id,
      }))
    };
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = environment.baseurl + environment.STUDENT_REPORT;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async getActivityTracker(user_id, email, cohort_id, token) {
    var data = {
      data: this.crypto.encrypt(JSON.stringify({
        user_id: user_id,
        email: email,
        cohort_id: cohort_id,
      }))
    };
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = environment.baseurl + environment.ACTIVITY_TRACKER;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async getNextLiveCall(cohort_id, user_id, token) {
    let data = {
      data: this.crypto.encrypt(JSON.stringify({
        cohort_id: cohort_id,
        user_id: user_id
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = environment.baseurl + environment.GET_NEXT_LIVE_CALL;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }
  async getPaymentTranction(email, user_id, cohort_id, token) {
    let data = {
      data: this.crypto.encrypt(JSON.stringify({
        email: email,
        user_id: user_id,
        cohort_id: cohort_id
      }))
    }
    let headers = new Headers();
    headers.append('Accept', 'application/json');
    let options = new RequestOptions({ headers: headers });
    return new Promise((resolve) => {
      let headers = new Headers();
      headers.append('Accept', 'application/json');
      headers.append('Authorization', 'Bearer ' + token);
      let options = new RequestOptions({ headers: headers });
      var url = environment.baseurl + environment.GET_PAYMENT_TRANSACTIONS;
      this.http.post(url, data, options).subscribe(
        (res) => {
          resolve([{ status: res.status, json: res['_body'] }]);
        },
        (err) => {
          resolve([{ status: err.status, json: err['_body'] }]);
        }
      );
    });
  }

}