export class EmptyState {
  dom: HTMLDivElement;
  constructor(
    parent: HTMLElement,
    text = "No Data",
    body = "No item(s) to display"
  ) {
    this.dom = document.createElement("div");
    this.dom.style.margin = "auto";
    this.dom.innerHTML = this.html(text, body);
    document.body.appendChild(this.dom);
    parent.appendChild(this.dom);
  }

  html(title: string, body: string) {
    return `
    <div style="
    background: #ffecec;
" class="px-4 py-5 my-5 text-center">
    <h5 class="display-5 fw-bold">${title}</h5>
    <div class="col-lg-6 mx-auto">
      <p class="lead mb-4">${body}</p>
    </div>
  </div>
    `;
  }
}
