import { PlBlockPageTitleTeleportTarget as e } from "./PlBlockPageTitleTeleportTarget.js";
import './pl-block-page.css';/* empty css              */
import t from "../../components/PlIcon24/PlIcon24.js";
import "../../components/PlIcon24/index.js";
import n from "../PlPlaceholder/PlPlaceholder.js";
import { PL_PLACEHOLDER_TEXTS as r } from "../PlPlaceholder/index.js";
import { computed as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createVNode as c, defineComponent as l, guardReactiveProps as u, mergeModels as d, normalizeClass as f, normalizeProps as p, normalizeStyle as m, openBlock as h, renderSlot as g, toDisplayString as _, unref as v, useCssModule as y, useModel as b, useSlots as x, useTemplateRef as S, vModelText as C, vShow as w, watchEffect as T, withDirectives as E } from "vue";
var D = { class: "pl-block-page__title" }, O = { class: "pl-block-page__title__default" }, k = { key: 0 }, A = { key: 1 }, j = { class: "pl-block-page__title__append" }, M = ["placeholder"], N = { key: 1 }, P = { class: "pl-block-page__body" }, F = /* @__PURE__ */ l({
	name: "PlBlockPage",
	props: /* @__PURE__ */ d({
		title: {},
		subtitlePlaceholder: {},
		noBodyGutters: { type: Boolean },
		bodyLoading: {}
	}, {
		subtitle: {},
		subtitleModifiers: {}
	}),
	emits: ["update:subtitle"],
	setup(l) {
		let d = x(), F = l, I = b(l, "subtitle"), L = y(), R = i(() => typeof F.bodyLoading == "string" ? {
			variant: F.bodyLoading,
			...r.LOADING
		} : F.bodyLoading), z = S("teleportTarget");
		return T(() => {
			e.value = z.value;
		}), (e, r) => (h(), o("div", { class: f(["pl-layout-component pl-block-page", { noBodyGutters: F.noBodyGutters }]) }, [v(d).title || F.title ? (h(), o("div", {
			key: 0,
			class: f(v(L).header)
		}, [s("div", D, [s("div", O, [v(d).title ? (h(), o("span", k, [g(e.$slots, "title")])) : (h(), o("span", A, _(F.title), 1)), g(e.$slots, "after-title")]), s("div", j, [s("div", {
			ref_key: "teleportTarget",
			ref: z,
			class: "pl-block-page__title__append__teleport"
		}, null, 512), g(e.$slots, "append")])]), I.value === void 0 ? a("", !0) : (h(), o("div", {
			key: 0,
			class: f(v(L).subtitle)
		}, [E(s("input", {
			"onUpdate:modelValue": r[0] ||= (e) => I.value = e,
			placeholder: F.subtitlePlaceholder
		}, null, 8, M), [[
			C,
			I.value,
			void 0,
			{
				lazy: !0,
				trim: !0
			}
		]]), c(v(t), {
			class: f(v(L).editIcon),
			name: "edit",
			color: "var(--ic-02)"
		}, null, 8, ["class"])], 2))], 2)) : (h(), o("div", N)), s("div", P, [E(c(v(n), p(u(R.value)), null, 16), [[w, R.value]]), s("div", { style: m({ display: R.value ? "none" : "contents" }) }, [g(e.$slots, "default")], 4)])], 2));
	}
});
export { F as default };

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