import { n as __exportAll } from "./chunk-B-1-B7_t.js";
import { n as cn } from "./utils-DXzSsU1e.js";
import { n as Badge_default } from "./badge-BbQrSqE-.js";
import { n as Button_default } from "./button-B9CnnuTu.js";
import { d as Sheet_default, i as SheetHeader_default, n as SheetTrigger_default, r as SheetTitle_default, s as SheetContent_default } from "./sheet-BUh3-iGH.js";
import { t as ElementRenderer_default } from "./ElementRenderer-DV1pZRd4.js";
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, normalizeClass, openBlock, renderList, toDisplayString, unref, withCtx } from "vue";
import { Construction } from "@lucide/vue";
//#region src/components/compositions/elements/configuration-block/ModalBlock.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = {
	key: 0,
	class: "flex flex-col gap-3 py-4"
};
var _hoisted_2 = {
	key: 1,
	class: "py-4 text-sm text-muted-foreground"
};
var styleKey = "modal";
var ModalBlock_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "ModalBlock",
	props: {
		label: { default: "Modal" },
		name: {},
		triggerLabel: {},
		title: {},
		nestedElements: { default: () => [] },
		item: { default: () => ({}) },
		classList: {}
	},
	setup(__props) {
		/**
		* Props-driven renderer for `configuration-block/modal`.
		*
		* Sister to DialogBlock — wraps inner children (`nestedElements`) in a
		* full-bleed Sheet-style modal opened by a trigger Button. Full
		* FormBuilder integration arrives in task #7.
		*/
		const props = __props;
		const resolvedTrigger = computed(() => props.triggerLabel ?? props.label ?? "Open modal");
		const resolvedTitle = computed(() => props.title ?? props.label ?? "Modal");
		const children = computed(() => (props.nestedElements ?? []).filter((entry) => typeof entry === "object" && entry !== null && typeof entry.type === "string"));
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(Sheet_default), null, {
				default: withCtx(() => [createVNode(unref(SheetTrigger_default), { "as-child": "" }, {
					default: withCtx(() => [createVNode(unref(Button_default), {
						type: "button",
						variant: "outline",
						class: normalizeClass(unref(cn)(props.classList)),
						"data-element-name": props.name ?? void 0,
						"data-stub": `configuration-block/${styleKey}`,
						"aria-label": props.label
					}, {
						default: withCtx(() => [
							createVNode(unref(Construction), { class: "size-4" }),
							createTextVNode(" " + toDisplayString(resolvedTrigger.value) + " ", 1),
							createVNode(unref(Badge_default), {
								variant: "outline",
								size: "sm"
							}, {
								default: withCtx(() => [createTextVNode(toDisplayString(styleKey))]),
								_: 1
							})
						]),
						_: 1
					}, 8, [
						"class",
						"data-element-name",
						"data-stub",
						"aria-label"
					])]),
					_: 1
				}), createVNode(unref(SheetContent_default), {
					side: "right",
					class: "sm:max-w-xl"
				}, {
					default: withCtx(() => [createVNode(unref(SheetHeader_default), null, {
						default: withCtx(() => [createVNode(unref(SheetTitle_default), null, {
							default: withCtx(() => [createTextVNode(toDisplayString(resolvedTitle.value), 1)]),
							_: 1
						})]),
						_: 1
					}), children.value.length ? (openBlock(), createElementBlock("div", _hoisted_1, [(openBlock(true), createElementBlock(Fragment, null, renderList(children.value, (child) => {
						return openBlock(), createBlock(ElementRenderer_default, {
							key: child.id,
							element: child,
							item: props.item
						}, null, 8, ["element", "item"]);
					}), 128))])) : (openBlock(), createElementBlock("p", _hoisted_2, " Modal block — FormBuilder integration coming in task #7. "))]),
					_: 1
				})]),
				_: 1
			});
		};
	}
});
//#endregion
//#region src/components/compositions/elements/configuration-block/ModalBlock.vue
var ModalBlock_exports = /* @__PURE__ */ __exportAll({ default: () => ModalBlock_default });
var ModalBlock_default = ModalBlock_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { ModalBlock_exports as n, ModalBlock_default as t };

//# sourceMappingURL=ModalBlock-c1XYlBoK.js.map