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

//# sourceMappingURL=PlErrorAlert.vue2.js.map