import {ChangeDetectorRef, Component, OnInit} from "@angular/core";
import {AppConfigService, CadesHelper} from "@webbpm/base-package";

@Component({
             moduleId: module.id,
             selector: "home-landing",
             templateUrl: "../../../../../src/resources/template/app/component/home_landing.html",
           })
export class HomeLandingComponent implements OnInit {

  constructor(private cd: ChangeDetectorRef, private appConfigService: AppConfigService) {
  }

  ngOnInit(): void {
    let url = this.appConfigService.getParamValue("cert_check_url")
    fetch(url, { mode: "no-cors" })
        .then(() => {
          document.getElementById("cert-check-info").hidden = true;
        })
        .catch((error) => {
          console.error("Error " + error);
        })
        .finally(() => this.cd.markForCheck());
  }
}
