'use strict';

Object.defineProperty(exports, '__esModule', { value: true });

const index = require('./index-1206254d.js');

const CorejamModal = class {
  constructor(hostRef) {
    index.registerInstance(this, hostRef);
    this.corejamModalClose = index.createEvent(this, "corejam:modal:close", 7);
    this.type = "success";
    this.colorMap = {
      error: "red-600",
      warning: "orange-500",
      success: "green-600",
    };
  }
  closeModal() {
    this.modalInstance.remove();
    this.corejamModalClose.emit();
  }
  render() {
    return (index.h(index.Host, null, index.h("corejam-box", { position: "fixed", z: 1000, top: 0, right: 0, bottom: 0, left: 0, style: { background: "rgba(255,255,255, 0.6", backdropFilter: "blur(2px)" } }, index.h("corejam-grid", { h: "100%", style: { placeItems: "center" } }, index.h("corejam-box", { bWidth: 1, bColor: "gray-400", rounded: "md", shadow: "lg", flex: true, items: "center", position: "relative", justify: "center", direction: "col", p: 4, h: "200px", w: "3", bg: "white" }, index.h("corejam-box", { onClick: () => this.closeModal(), top: 10, position: "absolute", right: 10 }, "X"), index.h("corejam-type", { weight: "bold", as: "h3", color: this.colorMap[this.type] }, this.type.toUpperCase()), index.h("corejam-type", null, this.message))))));
  }
  get modalInstance() { return index.getElement(this); }
};

exports.corejam_modal = CorejamModal;
