import { defineComponent as c, createElementBlock as t, createCommentVNode as l, openBlock as a, normalizeStyle as r, normalizeClass as d, createElementVNode as o, toDisplayString as u, renderSlot as m } from "vue";
/* empty css              */
const y = {
  key: 0,
  class: "pl-alert__icon"
}, f = { class: "pl-alert__main" }, v = { key: 0 }, p = { class: "pl-alert__main__text" }, b = {
  name: "PlAlert"
}, S = /* @__PURE__ */ c({
  ...b,
  props: {
    modelValue: { type: Boolean, default: !0 },
    type: { default: void 0 },
    label: { default: void 0 },
    icon: { type: Boolean, default: void 0 },
    closeable: { type: Boolean, default: void 0 },
    monospace: { type: Boolean, default: void 0 },
    whiteSpacePre: { type: Boolean, default: void 0 },
    maxHeight: { default: void 0 }
  },
  emits: ["update:modelValue"],
  setup(e) {
    const s = {
      success: "success",
      warn: "warning",
      info: "edit",
      error: "error"
    };
    return (n, i) => e.modelValue ? (a(), t("div", {
      key: 0,
      class: d(["pl-alert", [{ monospace: e.monospace, whiteSpacePre: e.whiteSpacePre }, e.type ? `pl-alert__${e.type}` : ""]]),
      style: r({ maxHeight: e.maxHeight })
    }, [
      e.icon && e.type ? (a(), t("div", y, [
        o("div", {
          class: d(`icon-24 icon-${s[e.type]}`)
        }, null, 2)
      ])) : l("", !0),
      o("div", f, [
        e.label ? (a(), t("label", v, u(e.label), 1)) : l("", !0),
        o("div", p, [
          m(n.$slots, "default")
        ])
      ]),
      e.closeable ? (a(), t("div", {
        key: 1,
        class: "pl-alert__close-btn",
        "aria-label": "Close alert",
        role: "button",
        onClick: i[0] || (i[0] = (h) => n.$emit("update:modelValue", !1))
      })) : l("", !0)
    ], 6)) : l("", !0);
  }
});
export {
  S as default
};
//# sourceMappingURL=PlAlert.vue.js.map
