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 { n as CardTitle_default, o as CardContent_default, r as CardHeader_default, s as Card_default } from "./card-X74FuL7B.js";
import { t as Input_default } from "./input-CwDp-vE8.js";
import { n as Label_default } from "./label-C5K3zowH.js";
import { l as SelectContent_default, n as SelectTrigger_default, s as SelectItem_default, t as SelectValue_default, u as Select_default } from "./select-Dwoxq29k.js";
import { r as Switch_default } from "./switch-E1QdwZg_.js";
import { r as useDependencyListBuilder } from "./dependencyListBuilderStore-DTxW2nCm.js";
import { t as FieldFrame_default } from "./field-frame-DhCOWcMP.js";
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, onMounted, openBlock, ref, renderList, toDisplayString, unref, useModel, watch, withCtx, withModifiers } from "vue";
import { Plus, Trash2, X } from "@lucide/vue";
//#region src/components/compositions/elements/builder/DependencyListBuilder.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = ["data-element-name"];
var _hoisted_2 = {
	class: "flex flex-col gap-2 border-r p-3 overflow-y-auto",
	"data-testid": "dependency-list-builder-palette"
};
var _hoisted_3 = { class: "flex flex-col gap-1" };
var _hoisted_4 = ["data-testid", "onClick"];
var _hoisted_5 = { class: "font-medium" };
var _hoisted_6 = {
	class: "flex flex-col gap-3 overflow-y-auto p-3",
	"data-testid": "dependency-list-builder-canvas"
};
var _hoisted_7 = { class: "flex items-center justify-between" };
var _hoisted_8 = {
	key: 0,
	class: "py-6 text-center text-xs text-muted-foreground",
	"data-testid": "dependency-list-builder-canvas-empty"
};
var _hoisted_9 = {
	key: 1,
	class: "flex flex-col gap-1 text-xs",
	"data-testid": "dependency-list-builder-canvas-list"
};
var _hoisted_10 = ["data-testid", "onClick"];
var _hoisted_11 = { class: "w-6 text-right tabular-nums text-muted-foreground" };
var _hoisted_12 = { class: "font-medium" };
var _hoisted_13 = {
	class: "flex flex-col gap-2 overflow-y-auto border-l p-3",
	"data-testid": "dependency-list-builder-inspector"
};
var _hoisted_14 = { class: "flex items-center justify-between" };
var _hoisted_15 = {
	key: 0,
	class: "py-3 text-xs text-muted-foreground",
	"data-testid": "dependency-list-builder-inspector-empty"
};
var _hoisted_16 = {
	key: 1,
	class: "flex flex-col gap-3",
	"data-testid": "dependency-list-builder-inspector-fields"
};
var _hoisted_17 = { class: "flex flex-col gap-1" };
var _hoisted_18 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_19 = { class: "flex flex-col gap-1" };
var _hoisted_20 = {
	key: 0,
	class: "text-xs text-muted-foreground"
};
var _hoisted_21 = ["data-testid"];
var _hoisted_22 = { class: "flex items-center justify-between" };
var _hoisted_23 = { class: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground" };
var _hoisted_24 = { class: "flex flex-col gap-1" };
var _hoisted_25 = { class: "flex flex-col gap-1" };
var _hoisted_26 = {
	key: 0,
	class: "flex flex-col gap-1"
};
var _hoisted_27 = {
	key: 0,
	class: "text-xs text-muted-foreground"
};
var _hoisted_28 = ["data-testid"];
var _hoisted_29 = { class: "flex items-center justify-between" };
var _hoisted_30 = { class: "text-[10px] font-semibold uppercase tracking-wide text-muted-foreground" };
var _hoisted_31 = { class: "flex flex-col gap-1" };
var _hoisted_32 = { class: "flex flex-col gap-1" };
var _hoisted_33 = { class: "flex flex-col gap-1" };
var _hoisted_34 = { class: "flex items-center gap-1" };
var DependencyListBuilder_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "DependencyListBuilder",
	props: /* @__PURE__ */ mergeModels({
		modelValue: {},
		builderId: {},
		name: {},
		item: { default: () => ({}) },
		classList: {},
		label: {},
		hideLabel: { type: Boolean },
		helpText: {},
		errors: { default: () => [] }
	}, {
		"modelValue": {},
		"modelModifiers": {}
	}),
	emits: ["update:modelValue"],
	setup(__props) {
		/**
		* DependencyListBuilder — visual editor for a list of conditional
		* rules of the shape "when X happens then Y".
		*
		* Three-pane layout (matches FormBuilder):
		*   - LEFT (Palette):    "Add rule" + a handful of rule templates.
		*   - MIDDLE (Canvas):   ordered list of rules; click a row to select.
		*   - RIGHT (Inspector): edits the selected rule — name, enabled,
		*                        conditions (add/edit/remove), actions
		*                        (add/edit/remove), conditionsLogic.
		*
		* State is owned by `dependencyListBuilderStore`. Two-way binds the
		* full `DependencyListBuilderSchema` via `defineModel`.
		*/
		const props = __props;
		const model = useModel(__props, "modelValue");
		let nextAutoId = 0;
		function makeAutoId() {
			nextAutoId += 1;
			return `dep-list-builder-${Date.now()}-${nextAutoId}`;
		}
		const fallbackId = ref(makeAutoId());
		const builder = useDependencyListBuilder(computed(() => props.builderId ?? fallbackId.value).value);
		function isSchema(value) {
			if (typeof value !== "object" || value === null) return false;
			return Array.isArray(value.rules);
		}
		onMounted(() => {
			const seed = model.value;
			if (isSchema(seed)) builder.loadSchema(seed);
		});
		watch(() => builder.schema.value, (next) => {
			model.value = next;
		}, { deep: true });
		const rules = computed(() => builder.schema.value.rules);
		const selectedId = computed(() => builder.selection.value.id);
		const selectedRule = computed(() => {
			const id = selectedId.value;
			if (!id) return null;
			return rules.value.find((r) => r.id === id) ?? null;
		});
		const OPERATORS = [
			{
				label: "equals",
				value: "equals"
			},
			{
				label: "not equals",
				value: "not_equals"
			},
			{
				label: "greater than",
				value: "greater_than"
			},
			{
				label: "less than",
				value: "less_than"
			},
			{
				label: "contains",
				value: "contains"
			},
			{
				label: "is truthy",
				value: "is_truthy"
			},
			{
				label: "is falsy",
				value: "is_falsy"
			}
		];
		const ACTION_TYPES = [
			{
				label: "Show field",
				value: "show"
			},
			{
				label: "Hide field",
				value: "hide"
			},
			{
				label: "Require field",
				value: "require"
			},
			{
				label: "Set value",
				value: "set_value"
			},
			{
				label: "Emit event",
				value: "emit_event"
			}
		];
		const LOGIC = [{
			label: "AND (all)",
			value: "AND"
		}, {
			label: "OR (any)",
			value: "OR"
		}];
		const PALETTE = [
			{
				label: "Add rule",
				template: "blank"
			},
			{
				label: "Show field",
				template: "show-field"
			},
			{
				label: "Hide field",
				template: "hide-field"
			},
			{
				label: "Set value",
				template: "set-value"
			}
		];
		function onPaletteAdd(template) {
			const id = builder.addRule(template);
			builder.select(id);
		}
		function onRuleClick(ruleId) {
			builder.select(ruleId);
		}
		function onClearSelection() {
			builder.select(null);
		}
		function onRemoveSelected() {
			const id = selectedId.value;
			if (id) builder.removeRule(id);
		}
		function patchSelected(patch) {
			const id = selectedId.value;
			if (id) builder.updateRule(id, patch);
		}
		function onNameInput(e) {
			patchSelected({ name: e.target.value });
		}
		function onEnabledChange(v) {
			patchSelected({ enabled: v });
		}
		function onLogicChange(v) {
			if (v === "AND" || v === "OR") patchSelected({ conditionsLogic: v });
		}
		function onAddCondition() {
			const id = selectedId.value;
			if (id) builder.addCondition(id);
		}
		function onConditionFieldInput(index, e) {
			const id = selectedId.value;
			if (id) builder.updateCondition(id, index, { field: e.target.value });
		}
		function onConditionOperatorChange(index, v) {
			const id = selectedId.value;
			if (id && isOperator(v)) builder.updateCondition(id, index, { operator: v });
		}
		function onConditionValueInput(index, e) {
			const id = selectedId.value;
			if (id) builder.updateCondition(id, index, { value: e.target.value });
		}
		function onRemoveCondition(index) {
			const id = selectedId.value;
			if (id) builder.removeCondition(id, index);
		}
		function onAddAction() {
			const id = selectedId.value;
			if (id) builder.addAction(id);
		}
		function onActionTypeChange(index, v) {
			const id = selectedId.value;
			if (id && isActionType(v)) builder.updateAction(id, index, { type: v });
		}
		function onActionTargetInput(index, e) {
			const id = selectedId.value;
			if (id) builder.updateAction(id, index, { target: e.target.value });
		}
		function onActionPayloadInput(index, e) {
			const id = selectedId.value;
			if (id) builder.updateAction(id, index, { payload: e.target.value });
		}
		function onRemoveAction(index) {
			const id = selectedId.value;
			if (id) builder.removeAction(id, index);
		}
		function isOperator(value) {
			return OPERATORS.some((o) => o.value === value);
		}
		function isActionType(value) {
			return ACTION_TYPES.some((a) => a.value === value);
		}
		function conditionValueString(c) {
			if (c.value === null || c.value === void 0) return "";
			return String(c.value);
		}
		function actionTargetString(a) {
			return a.target ?? "";
		}
		function actionPayloadString(a) {
			if (a.payload === null || a.payload === void 0) return "";
			return String(a.payload);
		}
		return (_ctx, _cache) => {
			return openBlock(), createBlock(unref(FieldFrame_default), {
				label: props.label,
				"hide-label": props.hideLabel,
				"help-text": props.helpText,
				errors: props.errors,
				class: normalizeClass(props.classList)
			}, {
				default: withCtx(() => [createElementVNode("div", {
					class: normalizeClass(unref(cn)("gxp-dependency-list-builder grid gap-3 rounded-lg border bg-card")),
					style: {
						"grid-template-columns": "220px 1fr 320px",
						"min-height": "24rem"
					},
					"data-testid": "dependency-list-builder",
					"data-element-name": props.name ?? void 0
				}, [
					createElementVNode("aside", _hoisted_2, [_cache[1] || (_cache[1] = createElementVNode("h4", { class: "text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, " Rule palette ", -1)), createElementVNode("div", _hoisted_3, [(openBlock(), createElementBlock(Fragment, null, renderList(PALETTE, (entry) => {
						return createElementVNode("button", {
							key: entry.template,
							type: "button",
							class: "flex items-start gap-2 rounded-md border bg-background px-2 py-1.5 text-left text-xs transition-colors hover:border-primary hover:bg-accent/40",
							"data-testid": `dependency-list-builder-palette-${entry.template}`,
							onClick: ($event) => onPaletteAdd(entry.template)
						}, [createVNode(unref(Plus), { class: "mt-0.5 h-3.5 w-3.5 shrink-0" }), createElementVNode("span", _hoisted_5, toDisplayString(entry.label), 1)], 8, _hoisted_4);
					}), 64))])]),
					createElementVNode("section", _hoisted_6, [createElementVNode("header", _hoisted_7, [_cache[3] || (_cache[3] = createElementVNode("h4", { class: "text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, " Rules ", -1)), createVNode(unref(Badge_default), {
						variant: "outline",
						class: "font-mono text-[10px]"
					}, {
						default: withCtx(() => [..._cache[2] || (_cache[2] = [createTextVNode(" builder/dependency-list-builder ", -1)])]),
						_: 1
					})]), rules.value.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_8, " Click \"Add rule\" in the palette to create a rule. ")) : (openBlock(), createElementBlock("ul", _hoisted_9, [(openBlock(true), createElementBlock(Fragment, null, renderList(rules.value, (rule, index) => {
						return openBlock(), createElementBlock("li", {
							key: rule.id,
							class: normalizeClass(["flex cursor-pointer items-center gap-2 rounded border bg-background px-2 py-1.5 transition-colors", selectedId.value === rule.id ? "border-primary bg-accent/30" : ""]),
							"data-testid": `dependency-list-builder-row-${rule.id}`,
							onClick: ($event) => onRuleClick(rule.id)
						}, [
							createElementVNode("span", _hoisted_11, toDisplayString(index + 1) + ". ", 1),
							createElementVNode("span", _hoisted_12, toDisplayString(rule.name || "(unnamed)"), 1),
							createVNode(unref(Badge_default), {
								variant: "secondary",
								class: "font-mono text-[9px]"
							}, {
								default: withCtx(() => [createTextVNode(toDisplayString(rule.conditions.length) + "c / " + toDisplayString(rule.actions.length) + "a ", 1)]),
								_: 2
							}, 1024),
							createVNode(unref(Switch_default), {
								class: "ml-auto",
								"model-value": rule.enabled,
								"data-testid": `dependency-list-builder-row-enabled-${rule.id}`,
								onClick: _cache[0] || (_cache[0] = withModifiers(() => {}, ["stop"])),
								"onUpdate:modelValue": (v) => unref(builder).updateRule(rule.id, { enabled: v })
							}, null, 8, [
								"model-value",
								"data-testid",
								"onUpdate:modelValue"
							])
						], 10, _hoisted_10);
					}), 128))]))]),
					createElementVNode("aside", _hoisted_13, [createElementVNode("header", _hoisted_14, [_cache[4] || (_cache[4] = createElementVNode("h4", { class: "text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, " Inspector ", -1)), selectedId.value ? (openBlock(), createBlock(unref(Button_default), {
						key: 0,
						variant: "ghost",
						size: "icon-sm",
						"aria-label": "Clear selection",
						onClick: onClearSelection
					}, {
						default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
						_: 1
					})) : createCommentVNode("", true)]), !selectedRule.value ? (openBlock(), createElementBlock("p", _hoisted_15, " Select a rule on the canvas to edit it. ")) : (openBlock(), createElementBlock("div", _hoisted_16, [
						createVNode(unref(Card_default), { class: "border-dashed" }, {
							default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
								default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "font-mono text-xs uppercase tracking-wide" }, {
									default: withCtx(() => [..._cache[5] || (_cache[5] = [createTextVNode(" Rule ", -1)])]),
									_: 1
								})]),
								_: 1
							}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
								default: withCtx(() => [
									createElementVNode("div", _hoisted_17, [createVNode(unref(Label_default), { for: "dep-name" }, {
										default: withCtx(() => [..._cache[6] || (_cache[6] = [createTextVNode("Name", -1)])]),
										_: 1
									}), createVNode(unref(Input_default), {
										id: "dep-name",
										"model-value": selectedRule.value.name,
										"data-testid": "dependency-list-builder-inspector-name",
										onInput: onNameInput
									}, null, 8, ["model-value"])]),
									createElementVNode("div", _hoisted_18, [createVNode(unref(Label_default), { for: "dep-enabled" }, {
										default: withCtx(() => [..._cache[7] || (_cache[7] = [createTextVNode("Enabled", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "dep-enabled",
										"model-value": selectedRule.value.enabled,
										"data-testid": "dependency-list-builder-inspector-enabled",
										"onUpdate:modelValue": onEnabledChange
									}, null, 8, ["model-value"])]),
									createElementVNode("div", _hoisted_19, [createVNode(unref(Label_default), null, {
										default: withCtx(() => [..._cache[8] || (_cache[8] = [createTextVNode("Conditions logic", -1)])]),
										_: 1
									}), createVNode(unref(Select_default), {
										"model-value": selectedRule.value.conditionsLogic,
										"onUpdate:modelValue": onLogicChange
									}, {
										default: withCtx(() => [createVNode(unref(SelectTrigger_default), { "data-testid": "dependency-list-builder-inspector-logic" }, {
											default: withCtx(() => [createVNode(unref(SelectValue_default))]),
											_: 1
										}), createVNode(unref(SelectContent_default), null, {
											default: withCtx(() => [(openBlock(), createElementBlock(Fragment, null, renderList(LOGIC, (opt) => {
												return createVNode(unref(SelectItem_default), {
													key: opt.value,
													value: opt.value
												}, {
													default: withCtx(() => [createTextVNode(toDisplayString(opt.label), 1)]),
													_: 2
												}, 1032, ["value"]);
											}), 64))]),
											_: 1
										})]),
										_: 1
									}, 8, ["model-value"])])
								]),
								_: 1
							})]),
							_: 1
						}),
						createVNode(unref(Card_default), { class: "border-dashed" }, {
							default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "flex flex-row items-center justify-between py-2" }, {
								default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "font-mono text-xs uppercase tracking-wide" }, {
									default: withCtx(() => [createTextVNode(" Conditions (" + toDisplayString(selectedRule.value.conditions.length) + ") ", 1)]),
									_: 1
								}), createVNode(unref(Button_default), {
									variant: "outline",
									size: "sm",
									"data-testid": "dependency-list-builder-add-condition",
									onClick: onAddCondition
								}, {
									default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[9] || (_cache[9] = createTextVNode(" Add ", -1))]),
									_: 1
								})]),
								_: 1
							}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-3 pb-3" }, {
								default: withCtx(() => [selectedRule.value.conditions.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_20, " No conditions yet. ")) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(selectedRule.value.conditions, (condition, index) => {
									return openBlock(), createElementBlock("div", {
										key: index,
										class: "flex flex-col gap-1 rounded border bg-background p-2",
										"data-testid": `dependency-list-builder-condition-${index}`
									}, [
										createElementVNode("div", _hoisted_22, [createElementVNode("span", _hoisted_23, " #" + toDisplayString(index + 1), 1), createVNode(unref(Button_default), {
											variant: "ghost",
											size: "icon-sm",
											"aria-label": "Remove condition",
											"data-testid": `dependency-list-builder-condition-remove-${index}`,
											onClick: ($event) => onRemoveCondition(index)
										}, {
											default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
											_: 1
										}, 8, ["data-testid", "onClick"])]),
										createElementVNode("div", _hoisted_24, [createVNode(unref(Label_default), { for: `dep-cond-field-${index}` }, {
											default: withCtx(() => [..._cache[10] || (_cache[10] = [createTextVNode("Field", -1)])]),
											_: 1
										}, 8, ["for"]), createVNode(unref(Input_default), {
											id: `dep-cond-field-${index}`,
											"model-value": condition.field,
											"data-testid": `dependency-list-builder-condition-field-${index}`,
											onInput: (e) => onConditionFieldInput(index, e)
										}, null, 8, [
											"id",
											"model-value",
											"data-testid",
											"onInput"
										])]),
										createElementVNode("div", _hoisted_25, [createVNode(unref(Label_default), null, {
											default: withCtx(() => [..._cache[11] || (_cache[11] = [createTextVNode("Operator", -1)])]),
											_: 1
										}), createVNode(unref(Select_default), {
											"model-value": condition.operator,
											"onUpdate:modelValue": (v) => onConditionOperatorChange(index, v)
										}, {
											default: withCtx(() => [createVNode(unref(SelectTrigger_default), { "data-testid": `dependency-list-builder-condition-operator-${index}` }, {
												default: withCtx(() => [createVNode(unref(SelectValue_default))]),
												_: 1
											}, 8, ["data-testid"]), createVNode(unref(SelectContent_default), null, {
												default: withCtx(() => [(openBlock(), createElementBlock(Fragment, null, renderList(OPERATORS, (op) => {
													return createVNode(unref(SelectItem_default), {
														key: op.value,
														value: op.value
													}, {
														default: withCtx(() => [createTextVNode(toDisplayString(op.label), 1)]),
														_: 2
													}, 1032, ["value"]);
												}), 64))]),
												_: 1
											})]),
											_: 2
										}, 1032, ["model-value", "onUpdate:modelValue"])]),
										condition.operator !== "is_truthy" && condition.operator !== "is_falsy" ? (openBlock(), createElementBlock("div", _hoisted_26, [createVNode(unref(Label_default), { for: `dep-cond-value-${index}` }, {
											default: withCtx(() => [..._cache[12] || (_cache[12] = [createTextVNode("Value", -1)])]),
											_: 1
										}, 8, ["for"]), createVNode(unref(Input_default), {
											id: `dep-cond-value-${index}`,
											"model-value": conditionValueString(condition),
											"data-testid": `dependency-list-builder-condition-value-${index}`,
											onInput: (e) => onConditionValueInput(index, e)
										}, null, 8, [
											"id",
											"model-value",
											"data-testid",
											"onInput"
										])])) : createCommentVNode("", true)
									], 8, _hoisted_21);
								}), 128))]),
								_: 1
							})]),
							_: 1
						}),
						createVNode(unref(Card_default), { class: "border-dashed" }, {
							default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "flex flex-row items-center justify-between py-2" }, {
								default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "font-mono text-xs uppercase tracking-wide" }, {
									default: withCtx(() => [createTextVNode(" Actions (" + toDisplayString(selectedRule.value.actions.length) + ") ", 1)]),
									_: 1
								}), createVNode(unref(Button_default), {
									variant: "outline",
									size: "sm",
									"data-testid": "dependency-list-builder-add-action",
									onClick: onAddAction
								}, {
									default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[13] || (_cache[13] = createTextVNode(" Add ", -1))]),
									_: 1
								})]),
								_: 1
							}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-3 pb-3" }, {
								default: withCtx(() => [selectedRule.value.actions.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_27, " No actions yet. ")) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(selectedRule.value.actions, (action, index) => {
									return openBlock(), createElementBlock("div", {
										key: index,
										class: "flex flex-col gap-1 rounded border bg-background p-2",
										"data-testid": `dependency-list-builder-action-${index}`
									}, [
										createElementVNode("div", _hoisted_29, [createElementVNode("span", _hoisted_30, " #" + toDisplayString(index + 1), 1), createVNode(unref(Button_default), {
											variant: "ghost",
											size: "icon-sm",
											"aria-label": "Remove action",
											"data-testid": `dependency-list-builder-action-remove-${index}`,
											onClick: ($event) => onRemoveAction(index)
										}, {
											default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
											_: 1
										}, 8, ["data-testid", "onClick"])]),
										createElementVNode("div", _hoisted_31, [createVNode(unref(Label_default), null, {
											default: withCtx(() => [..._cache[14] || (_cache[14] = [createTextVNode("Type", -1)])]),
											_: 1
										}), createVNode(unref(Select_default), {
											"model-value": action.type,
											"onUpdate:modelValue": (v) => onActionTypeChange(index, v)
										}, {
											default: withCtx(() => [createVNode(unref(SelectTrigger_default), { "data-testid": `dependency-list-builder-action-type-${index}` }, {
												default: withCtx(() => [createVNode(unref(SelectValue_default))]),
												_: 1
											}, 8, ["data-testid"]), createVNode(unref(SelectContent_default), null, {
												default: withCtx(() => [(openBlock(), createElementBlock(Fragment, null, renderList(ACTION_TYPES, (t) => {
													return createVNode(unref(SelectItem_default), {
														key: t.value,
														value: t.value
													}, {
														default: withCtx(() => [createTextVNode(toDisplayString(t.label), 1)]),
														_: 2
													}, 1032, ["value"]);
												}), 64))]),
												_: 1
											})]),
											_: 2
										}, 1032, ["model-value", "onUpdate:modelValue"])]),
										createElementVNode("div", _hoisted_32, [createVNode(unref(Label_default), { for: `dep-action-target-${index}` }, {
											default: withCtx(() => [..._cache[15] || (_cache[15] = [createTextVNode("Target", -1)])]),
											_: 1
										}, 8, ["for"]), createVNode(unref(Input_default), {
											id: `dep-action-target-${index}`,
											"model-value": actionTargetString(action),
											"data-testid": `dependency-list-builder-action-target-${index}`,
											onInput: (e) => onActionTargetInput(index, e)
										}, null, 8, [
											"id",
											"model-value",
											"data-testid",
											"onInput"
										])]),
										createElementVNode("div", _hoisted_33, [createVNode(unref(Label_default), { for: `dep-action-payload-${index}` }, {
											default: withCtx(() => [..._cache[16] || (_cache[16] = [createTextVNode("Payload", -1)])]),
											_: 1
										}, 8, ["for"]), createVNode(unref(Input_default), {
											id: `dep-action-payload-${index}`,
											"model-value": actionPayloadString(action),
											"data-testid": `dependency-list-builder-action-payload-${index}`,
											onInput: (e) => onActionPayloadInput(index, e)
										}, null, 8, [
											"id",
											"model-value",
											"data-testid",
											"onInput"
										])])
									], 8, _hoisted_28);
								}), 128))]),
								_: 1
							})]),
							_: 1
						}),
						createElementVNode("div", _hoisted_34, [createVNode(unref(Button_default), {
							variant: "destructive",
							size: "sm",
							class: "ml-auto",
							"data-testid": "dependency-list-builder-remove",
							onClick: onRemoveSelected
						}, {
							default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" }), _cache[17] || (_cache[17] = createTextVNode(" Remove rule ", -1))]),
							_: 1
						})])
					]))])
				], 10, _hoisted_1)]),
				_: 1
			}, 8, [
				"label",
				"hide-label",
				"help-text",
				"errors",
				"class"
			]);
		};
	}
});
//#endregion
//#region src/components/compositions/elements/builder/DependencyListBuilder.vue
var DependencyListBuilder_exports = /* @__PURE__ */ __exportAll({ default: () => DependencyListBuilder_default });
var DependencyListBuilder_default = DependencyListBuilder_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { DependencyListBuilder_exports as n, DependencyListBuilder_default as t };

//# sourceMappingURL=DependencyListBuilder-BwaxmuJX.js.map