class Task {
  title;
  timestamp;
  content;
  type;
  seen;

  constructor(title, timestamp, type, content) {
    this.title = title;
    this.timestamp = luxon.DateTime.fromISO(timestamp);
    this.type = type;
    this.content = content;
    this.seen = false;
  }

  setContent(content) {
    this.content = content;
  }

  getContent() {
    if (this.type === "text") {
      var taskModal = parseTaskModal(this.title, this.content);
      $("#task").html(taskModal);
      $("#task").modal("show");
    } else {
      window.open(this.content, "_blank").focus();
    }

    this.seen = true;
    $(`#new-marker-${this.title}`).html("");
  }
}
