import { defineComponent as c, createElementBlock as p, openBlock as d, normalizeClass as s, normalizeStyle as f, createVNode as o, renderSlot as a, unref as i, createElementVNode as l, toDisplayString as r } from "vue";
import g from "../PlClipboard/PlClipboard.vue.js";
import u from "../PlIcon16/PlIcon16.vue.js";
const y = {
  name: "PlErrorAlert"
}, k = /* @__PURE__ */ c({
  ...y,
  props: {
    title: { default: void 0 },
    message: { default: void 0 },
    maxHeight: { default: "300px" },
    copyMessage: { default: void 0 }
  },
  setup(n) {
    const t = n;
    function m() {
      const e = t.copyMessage ?? t.message;
      typeof e == "string" && navigator.clipboard.writeText(e);
    }
    return (e, v) => (d(), p("div", {
      style: f({ maxHeight: t.maxHeight }),
      class: s(e.$style.root)
    }, [
      o(i(g), {
        class: s(e.$style.copy),
        onCopy: m
      }, null, 8, ["class"]),
      a(e.$slots, "title", {}, () => [
        l("div", {
          class: s(e.$style.title)
        }, [
          o(i(u), {
            class: s(e.$style.titleIcon),
            name: "warning"
          }, null, 8, ["class"]),
          l("div", {
            class: s(e.$style.titleText)
          }, r(t.title), 3)
        ], 2)
      ]),
      a(e.$slots, "message", {}, () => [
        l("div", {
          class: s(e.$style.message)
        }, r(t.message), 3)
      ])
    ], 6));
  }
});
export {
  k as default
};
//# sourceMappingURL=PlErrorAlert.vue2.js.map
