(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(`.pl-alert{--text-font-family: var(--font-family-base);--text-white-space: normal;--indent: 24px;position:relative;padding:12px;display:flex;flex-wrap:nowrap;gap:12px;border:1px solid var(--border-color-default);border-radius:6px;color:var(--txt-01)}.pl-alert.monospace{--text-font-family: var(--font-family-monospace)}.pl-alert.whiteSpacePre{--text-white-space: pre}.pl-alert__error{background:var(--notification-error)}.pl-alert__warn{background:var(--notification-warning)}.pl-alert__success{background:var(--notification-success)}.pl-alert__info{background:var(--notification-neutral)}.pl-alert__icon{width:24px}.pl-alert__main{display:flex;flex-direction:column;min-height:24px;flex:1;overflow:hidden;width:100%;gap:6px}.pl-alert__main label{font-size:20px;font-weight:500;line-height:24px;letter-spacing:-.2px}.pl-alert__main__text{font-size:14px;font-weight:500;line-height:20px;font-family:var(--text-font-family);white-space:var(--text-white-space);max-width:100%;flex:1;--thumb-color: var(--ic-02);overflow-y:auto}.pl-alert__main__text::-webkit-scrollbar{width:var(--scrollbar-width, 6px);height:5px;background-color:transparent;display:block}.pl-alert__main__text::-webkit-scrollbar-thumb{background:var(--thumb-color);border-radius:5px}.pl-alert__main__text::-webkit-scrollbar-thumb:hover{--thumb-color: var(--border-color-focus)}.pl-alert__close-btn{position:absolute;top:10px;right:12px;cursor:pointer;background-color:#d3d7e0;mask-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.99954%2018L11.9995%2012M11.9995%2012L17.9995%206M11.9995%2012L5.99954%206M11.9995%2012L17.9995%2018'%20stroke='%23110529'%20stroke-width='1.5'/%3e%3c/svg%3e");-webkit-mask-image:url("data:image/svg+xml,%3csvg%20width='24'%20height='24'%20viewBox='0%200%2024%2024'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M5.99954%2018L11.9995%2012M11.9995%2012L17.9995%206M11.9995%2012L5.99954%206M11.9995%2012L17.9995%2018'%20stroke='%23110529'%20stroke-width='1.5'/%3e%3c/svg%3e");mask-repeat:no-repeat;-webkit-mask-repeat:no-repeat;mask-position:center;-webkit-mask-position:center;mask-size:24px;-webkit-mask-size:24px;width:24px;height:24px;transition:all .1s ease-in-out}.pl-alert__close-btn:hover{background-color:var(--main-dark-color)}`)),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
import { defineComponent as r, createElementBlock as l, createCommentVNode as o, openBlock as a, normalizeStyle as d, normalizeClass as n, createElementVNode as t, toDisplayString as p, renderSlot as u } from "vue";

const m = {
  key: 0,
  class: "pl-alert__icon"
}, c = { class: "pl-alert__main" }, y = { key: 0 }, f = { class: "pl-alert__main__text" }, v = {
  name: "PlAlert"
}, B = /* @__PURE__ */ r({
  ...v,
  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(_) {
    const i = {
      success: "success",
      warn: "warning",
      info: "edit",
      error: "error"
    };
    return (e, s) => e.modelValue ? (a(), l("div", {
      key: 0,
      class: n(["pl-alert", [{ monospace: e.monospace, whiteSpacePre: e.whiteSpacePre }, e.type ? `pl-alert__${e.type}` : ""]]),
      style: d({ maxHeight: e.maxHeight })
    }, [
      e.icon && e.type ? (a(), l("div", m, [
        t("div", {
          class: n(`icon-24 icon-${i[e.type]}`)
        }, null, 2)
      ])) : o("", !0),
      t("div", c, [
        e.label ? (a(), l("label", y, p(e.label), 1)) : o("", !0),
        t("div", f, [
          u(e.$slots, "default")
        ])
      ]),
      e.closeable ? (a(), l("div", {
        key: 1,
        class: "pl-alert__close-btn",
        "aria-label": "Close alert",
        role: "button",
        onClick: s[0] || (s[0] = (b) => e.$emit("update:modelValue", !1))
      })) : o("", !0)
    ], 6)) : o("", !0);
  }
});
export {
  B as default
};
//# sourceMappingURL=PlAlert.vue.js.map
