text: import $ from "jquery";
  import {Router} from "../../services/routeur.component"
  
  export class MyNextButton {
  
      constructor(parent, btnText, classButton, idButton,link) {
  
          this.parent = parent;
          this.btnText = btnText;
          this.classButton = classButton;
          this.idButton = idButton;
          this.link = link;
  
          const myBtn = document.createElement("button");
  
          myBtn.appendChild(document.createTextNode(this.btnText));
          myBtn.setAttribute("class", this.classButton);
          myBtn.setAttribute("id", this.idButton);
          parent.appendChild(myBtn);
  
          myBtn.addEventListener("click", (event) => {
              this.clickButton(event);
          });
  
      }
  
      clickButton(event) {
          event.preventDefault();
          Router.navigate(this.link);
  
          
          console.log(location.pathname);
          console.log("Patname :"+location.pathname);
          console.log("Location Href :"+window.location.href);
          
          
          
      }
  
  
  
  };
  
   //window.location.href ="/register";
          // document.body.removeChild(document.body.lastChild);
          // console.log(document.body.lastChild.parentNode);
        //history.back()