import { r as registerInstance, h, H as Host, c as createEvent, a as getElement } from './index-419dc51e.js';

const Grid = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.grid = true;
  }
  async componentWillLoad() {
    await this.computeStyles();
  }
  componentShouldUpdate(newValue, oldValue) {
    return newValue != oldValue;
  }
  async computeStyles() {
    const hash = await (await import('./style-d0c60150.js').then(function (n) { return n.s; })).calculateStyles(this);
    this.hash = hash;
  }
  render() {
    return (h(Host, { class: this.hash }, h("slot", null)));
  }
};

const CorejamModal = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.corejamModalClose = 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 (h(Host, null, 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)" } }, h("corejam-grid", { h: "100%", style: { placeItems: "center" } }, 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" }, h("corejam-box", { onClick: () => this.closeModal(), top: 10, position: "absolute", right: 10 }, "X"), h("corejam-type", { weight: "bold", as: "h3", color: this.colorMap[this.type] }, this.type.toUpperCase()), h("corejam-type", null, this.message))))));
  }
  get modalInstance() { return getElement(this); }
};

export { Grid as corejam_grid, CorejamModal as corejam_modal };
