showDialog(type, ui, msg) {
    let content = "";
    if (msg.payload && typeof msg.payload === "string") content += `<div>${msg.payload}</div>`;
    if (ui.content) content += `<div>${ui.content}</div>`;
    if (content === "") {
      _a.log(1, "Ui:showDialog", "Toast content is blank. Not shown.")();
      return;
    }
    if (!ui.title && msg.topic) ui.title = msg.topic;
    if (ui.title) content = `<p class="toast-head">${ui.title}</p><p>${content}</p>`;
    if (ui.noAutohide) ui.noAutoHide = ui.noAutohide;
    if (ui.noAutoHide) ui.autohide = !ui.noAutoHide;
    if (ui.autoHideDelay) {
      if (!ui.autohide) ui.autohide = true;
      ui.delay = ui.autoHideDelay;
    } else ui.autoHideDelay = 1e4;
    if (!Object.prototype.hasOwnProperty.call(ui, "autohide")) ui.autohide = true;
    if (type === "alert") {
      ui.modal = true;
      ui.autohide = false;
      content = `<svg viewBox="0 0 192.146 192.146" style="width:30;background-color:transparent;"><path d="M108.186 144.372c0 7.054-4.729 12.32-12.037 12.32h-.254c-7.054 0-11.92-5.266-11.92-12.32 0-7.298 5.012-12.31 12.174-12.31s11.91 4.992 12.037 12.31zM88.44 125.301h15.447l2.951-61.298H85.46l2.98 61.298zm101.932 51.733c-2.237 3.664-6.214 5.921-10.493 5.921H12.282c-4.426 0-8.51-2.384-10.698-6.233a12.34 12.34 0 0 1 .147-12.349l84.111-149.22c2.208-3.722 6.204-5.96 10.522-5.96h.332c4.445.107 8.441 2.618 10.513 6.546l83.515 149.229c1.993 3.8 1.905 8.363-.352 12.066zm-10.493-6.4L96.354 21.454l-84.062 149.18h167.587z" /></svg> ${content}`;
    }
    let toaster = _a.doc.getElementById("toaster");
    if (toaster === null) {
      toaster = _a.doc.createElement("div");
      toaster.id = "toaster";
      toaster.title = "Click to clear all notifcations";
      toaster.setAttribute("class", "toaster");
      toaster.setAttribute("role", "dialog");
      toaster.setAttribute("arial-label", "Toast message");
      toaster.onclick = function() {
        toaster.remove();
      };
      _a.doc.body.insertAdjacentElement("afterbegin", toaster);
    }
    const toast = _a.doc.createElement("div");
    toast.title = "Click to clear this notifcation";
    toast.setAttribute("class", `toast ${ui.variant ? ui.variant : ""} ${type}`);
    toast.innerHTML = content;
    toast.setAttribute("role", "alertdialog");
    if (ui.modal) toast.setAttribute("aria-modal", ui.modal);
    toast.onclick = function(evt) {
      evt.stopPropagation();
      toast.remove();
      if (toaster.childElementCount < 1) toaster.remove();
    };
    if (type === "alert") {
    }
    toaster.insertAdjacentElement(ui.appendToast === true ? "beforeend" : "afterbegin", toast);
    if (ui.autohide === true) {
      setInterval(() => {
        toast.remove();
        if (toaster.childElementCount < 1) toaster.remove();
      }, ui.autoHideDelay);
    }
  }
Show a pop-over "toast" dialog or a modal alert // TODO - Allow notify to sit in corners rather than take over the screen
Refs: https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/alertdialog.html,
      https://www.w3.org/WAI/ARIA/apg/example-index/dialog-modal/dialog.html,
      https://www.w3.org/WAI/ARIA/apg/patterns/dialogmodal/
@param {"notify"|"alert"} type Dialog type
@param {object} ui standardised ui data
@param {object} [msg] msg.payload/msg.topic - only used if a string. Optional.
@returns {void}