class CancelModal implements Modal {
  self(): HTMLElement | null {
    return document.getElementById("cancel-container");
  }
  
  cancelMsg(): HTMLElement | null {
    return document.getElementById("cancel-msg");
  }
  
  cancelBtn(): HTMLElement | null {
    return document.getElementById("cancel-btn");
  }
  
  visible(): boolean {
    return this.self()?.style.display != "none";
  }
  
  setVisible(v: boolean): void {
    const modal = this.self();
    if (modal) {
      modal.style.display = v ? "block" : "none";
    }
  }
  
  setMsg(s: string): void {
    const msg = this.cancelMsg();
    if (msg) {
      msg.innerText = s;
    }
  }
}