import { r as registerInstance, h, H as Host } from './index-6334d911.js';

const CorejamFlash = class {
  constructor(hostRef) {
    registerInstance(this, hostRef);
    this.colors = {
      success: "red",
      info: "blue",
      warning: "orange",
      error: "red",
    };
  }
  flashEvent(evt) {
    this.flash = evt.detail;
  }
  render() {
    return (h(Host, null, this.flash && (h("corejam-box", { p: 3, bWidth: 1, rounded: "md", bColor: `${this.colors[this.flash.type]}-700`, bg: `${this.colors[this.flash.type]}-300`, m: 3, w: "12", h: "100%", onClick: () => (this.flash = null) }, this.flash.msg))));
  }
};

export { CorejamFlash as corejam_flash };
