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 { t as Textarea_default } from "./textarea-Bi7Nstc4.js";
import { n as TooltipProvider_default, o as Tooltip_default, r as TooltipContent_default, t as TooltipTrigger_default } from "./tooltip-CmRKH9DM.js";
import { n as useQuizBuilder } from "./quizBuilderStore-DF5Qdr3i.js";
import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeModels, normalizeClass, normalizeStyle, onBeforeUnmount, onMounted, openBlock, reactive, ref, renderList, resolveDynamicComponent, toDisplayString, unref, useModel, vShow, watch, withCtx, withDirectives, withModifiers } from "vue";
import * as LucideIcons from "@lucide/vue";
import { Calculator, CheckSquare, ChevronRight, CircleDot, CirclePlus, Database, GraduationCap, GripVertical, Info, Keyboard, LayersPlus, LayoutGrid, Link2, ListChecks, ListOrdered, PenLine, Plus, Settings, Sparkles, ToggleRight, Trash2, Underline, X } from "@lucide/vue";
//#region src/components/compositions/elements/builder/QuizBuilder.vue?vue&type=script&setup=true&lang.ts
var _hoisted_1 = ["data-element-name"];
var _hoisted_2 = {
	class: "flex flex-col items-center gap-1 border-r p-1.5",
	"data-testid": "quiz-builder-nav"
};
var _hoisted_3 = ["aria-pressed"];
var _hoisted_4 = ["aria-pressed", "title"];
var _hoisted_5 = {
	key: 1,
	class: "my-1 h-px w-5 bg-border/70",
	"aria-hidden": "true"
};
var _hoisted_6 = [
	"aria-pressed",
	"title",
	"data-testid",
	"onClick"
];
var _hoisted_7 = ["disabled"];
var _hoisted_8 = {
	key: 0,
	class: "flex min-h-0 flex-col gap-2 overflow-y-auto border-r",
	"data-testid": "quiz-builder-palette"
};
var _hoisted_9 = { class: "sticky top-0 z-10 flex items-center gap-1.5 border-b bg-card px-3 py-2" };
var _hoisted_10 = { class: "flex-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground" };
var _hoisted_11 = { class: "flex flex-col gap-2 px-3 pb-3" };
var _hoisted_12 = {
	key: 0,
	class: "flex flex-col gap-0.5",
	"data-testid": "quiz-builder-palette-custom"
};
var _hoisted_13 = { key: 0 };
var _hoisted_14 = ["data-testid", "onClick"];
var _hoisted_15 = { class: "font-medium" };
var _hoisted_16 = {
	key: 0,
	class: "ml-4 flex flex-col gap-0.5 pb-1"
};
var _hoisted_17 = ["data-testid", "onPointerdown"];
var _hoisted_18 = { class: "flex items-center gap-1.5" };
var _hoisted_19 = [
	"data-testid",
	"disabled",
	"onClick"
];
var _hoisted_20 = { class: "flex min-w-0 items-center gap-1.5" };
var _hoisted_21 = ["data-testid", "onPointerdown"];
var _hoisted_22 = { class: "flex items-center gap-1.5" };
var _hoisted_23 = [
	"data-testid",
	"disabled",
	"onClick"
];
var _hoisted_24 = { class: "flex min-w-0 items-center gap-1.5" };
var _hoisted_25 = {
	key: 1,
	class: "flex flex-col gap-1"
};
var _hoisted_26 = ["data-testid", "onPointerdown"];
var _hoisted_27 = { class: "flex min-w-0 items-center gap-1.5" };
var _hoisted_28 = [
	"data-testid",
	"disabled",
	"onClick"
];
var _hoisted_29 = { class: "flex min-w-0 items-center gap-1.5" };
var _hoisted_30 = {
	key: 2,
	class: "text-xs text-muted-foreground"
};
var _hoisted_31 = {
	key: 3,
	class: "flex flex-col gap-0.5 text-xs text-destructive",
	role: "alert"
};
var _hoisted_32 = {
	key: 1,
	class: "flex min-h-0 flex-col gap-2 overflow-y-auto border-r",
	"data-testid": "quiz-builder-config"
};
var _hoisted_33 = { class: "sticky top-0 z-10 flex items-center gap-1.5 border-b bg-card px-3 py-2" };
var _hoisted_34 = { class: "flex flex-col gap-3 px-3 pb-3" };
var _hoisted_35 = { class: "flex flex-col gap-1" };
var _hoisted_36 = { class: "flex flex-col gap-1" };
var _hoisted_37 = {
	key: 1,
	class: "text-[11px] text-muted-foreground",
	"data-testid": "quiz-builder-config-cannot-remove"
};
var _hoisted_38 = {
	class: "flex min-h-0 flex-col gap-3 overflow-y-auto p-3",
	"data-testid": "quiz-builder-canvas",
	"data-drag-surface": "quiz-layers"
};
var _hoisted_39 = {
	key: 0,
	class: "flex items-center justify-between gap-2"
};
var _hoisted_40 = { class: "flex min-w-0 flex-1 items-center gap-2" };
var _hoisted_41 = ["data-testid"];
var _hoisted_42 = {
	key: 2,
	class: "flex flex-col gap-1 text-xs",
	"data-testid": "quiz-builder-canvas-list"
};
var _hoisted_43 = {
	key: 0,
	class: "pointer-events-none relative",
	style: {
		"height": "0",
		"z-index": "5"
	},
	"data-testid": "quiz-builder-drop-indicator"
};
var _hoisted_44 = [
	"data-question-block-index",
	"data-testid",
	"onClick"
];
var _hoisted_45 = ["data-testid", "onPointerdown"];
var _hoisted_46 = { class: "w-5 text-right tabular-nums text-muted-foreground" };
var _hoisted_47 = { class: "flex min-w-0 flex-col" };
var _hoisted_48 = { class: "truncate font-medium" };
var _hoisted_49 = { class: "text-[10px] text-muted-foreground" };
var _hoisted_50 = {
	key: 0,
	class: "pointer-events-none relative",
	style: {
		"height": "0",
		"z-index": "5"
	},
	"data-testid": "quiz-builder-drop-indicator-end"
};
var _hoisted_51 = {
	key: 2,
	class: "flex min-h-0 items-start justify-center overflow-hidden border-l pt-3",
	"data-testid": "quiz-builder-inspector"
};
var _hoisted_52 = {
	class: "flex h-6 w-6 shrink-0 items-center justify-center rounded-full text-muted-foreground",
	tabindex: "0",
	"aria-label": "Select a question on the canvas to edit its properties",
	"data-testid": "quiz-builder-inspector-empty"
};
var _hoisted_53 = {
	key: 3,
	class: "flex min-h-0 flex-col gap-2 overflow-y-auto border-l p-3",
	"data-testid": "quiz-builder-inspector"
};
var _hoisted_54 = { class: "flex items-center justify-between gap-2" };
var _hoisted_55 = {
	class: "flex items-stretch border-b",
	role: "tablist",
	"data-testid": "quiz-builder-inspector-tabs"
};
var _hoisted_56 = ["aria-selected"];
var _hoisted_57 = ["aria-selected"];
var _hoisted_58 = ["aria-selected"];
var _hoisted_59 = ["data-active-tab"];
var _hoisted_60 = {
	class: "flex flex-col gap-2",
	"data-testid": "quiz-builder-inspector-panel-general"
};
var _hoisted_61 = { class: "flex flex-col gap-1" };
var _hoisted_62 = { class: "flex flex-col gap-1" };
var _hoisted_63 = { class: "flex flex-col gap-1" };
var _hoisted_64 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_65 = {
	class: "flex flex-col gap-3",
	"data-testid": "quiz-builder-inspector-panel-options"
};
var _hoisted_66 = ["data-testid"];
var _hoisted_67 = { class: "grid grid-cols-2 gap-1" };
var _hoisted_68 = { class: "flex flex-col gap-1" };
var _hoisted_69 = { class: "flex flex-col gap-1" };
var _hoisted_70 = { class: "grid grid-cols-2 items-center gap-1" };
var _hoisted_71 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_72 = { class: "flex flex-col gap-1" };
var _hoisted_73 = {
	key: 0,
	class: "py-2 text-center text-xs text-muted-foreground"
};
var _hoisted_74 = {
	key: 1,
	class: "flex items-center justify-between rounded border bg-background px-2 py-1",
	"data-testid": "quiz-builder-inspector-allow-partial-credit"
};
var _hoisted_75 = { class: "grid grid-cols-2 gap-1" };
var _hoisted_76 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_77 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_78 = { class: "flex flex-col gap-1" };
var _hoisted_79 = { class: "flex flex-col gap-1" };
var _hoisted_80 = { class: "flex flex-col gap-1" };
var _hoisted_81 = { class: "flex flex-col gap-1" };
var _hoisted_82 = { class: "grid grid-cols-2 gap-2" };
var _hoisted_83 = { class: "flex flex-col gap-1" };
var _hoisted_84 = { class: "flex flex-col gap-1" };
var _hoisted_85 = { class: "flex flex-col gap-1" };
var _hoisted_86 = ["data-testid"];
var _hoisted_87 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_88 = { class: "w-5 text-right tabular-nums text-muted-foreground" };
var _hoisted_89 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_90 = ["data-testid"];
var _hoisted_91 = { class: "flex items-center justify-between" };
var _hoisted_92 = { class: "font-mono text-[10px] text-muted-foreground" };
var _hoisted_93 = { class: "grid grid-cols-2 gap-1" };
var _hoisted_94 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_95 = { class: "flex items-center justify-between rounded border bg-background px-2 py-1" };
var _hoisted_96 = { class: "flex flex-col gap-1" };
var _hoisted_97 = ["data-testid"];
var _hoisted_98 = { class: "flex items-center gap-1" };
var _hoisted_99 = { class: "flex flex-col gap-1" };
var _hoisted_100 = { class: "flex flex-col gap-1" };
var _hoisted_101 = { class: "grid grid-cols-2 gap-1" };
var _hoisted_102 = { class: "flex flex-col gap-1" };
var _hoisted_103 = {
	key: 0,
	class: "flex flex-col gap-1"
};
var _hoisted_104 = {
	key: 0,
	class: "flex flex-col gap-2"
};
var _hoisted_105 = { class: "flex items-center justify-between" };
var _hoisted_106 = ["data-testid"];
var _hoisted_107 = { class: "grid grid-cols-[1fr_5rem_auto] gap-1" };
var _hoisted_108 = {
	class: "flex flex-col gap-2",
	"data-testid": "quiz-builder-inspector-panel-grading"
};
var _hoisted_109 = { class: "flex flex-col gap-1" };
var _hoisted_110 = { class: "flex flex-col gap-1" };
var QuizBuilder_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "QuizBuilder",
	props: /* @__PURE__ */ mergeModels({
		modelValue: {},
		builderId: {},
		label: {},
		name: {},
		item: { default: () => ({}) },
		classList: {},
		helpText: {},
		errors: { default: () => [] },
		hideLabel: { type: Boolean },
		required: { type: Boolean },
		readonly: { type: Boolean },
		disabled: { type: Boolean },
		hideElementTypes: {},
		customElementList: {},
		openAllSections: { type: Boolean },
		enableQuestionBanks: { type: Boolean },
		dragToAdd: { type: Boolean },
		maxHeight: { default: "40rem" }
	}, {
		"modelValue": {},
		"modelModifiers": {}
	}),
	emits: ["update:modelValue"],
	setup(__props) {
		/**
		* QuizBuilder — visual designer for a list of questions, grouped into
		* one or more question banks. The component's scope is the *questions*
		* and the *banks* that group them; quiz-level metadata (title,
		* scoring, …) is owned by the host page.
		*
		* Layout (left → right):
		*   - NAV RAIL (icon-only, always visible):
		*       • `?`  toggles the question-types column.
		*       • cog  (only when banks are enabled) toggles the bank-config
		*              column for the active bank.
		*       • —    divider (banks enabled).
		*       • DB   one icon per bank; the active one is highlighted.
		*       • `+`  adds a new bank, which becomes selected and opens the
		*              config column for inline naming.
		*   - SIDEBAR (toggleable, one of two modes):
		*       • palette — question-type chips / customElementList.
		*       • config  — bank name + description editor.
		*       A close button collapses the column.
		*   - LAYERS (always visible):
		*       The active bank's questions. Drag handle on the left of every
		*       row reorders within the bank. Selecting a row opens the
		*       inspector.
		*   - INSPECTOR (collapses to icon when nothing is selected, expands
		*       to ~280px when a question is selected — mirrors FormBuilder).
		*
		* State lives in `quizBuilderStore` (Pinia). The component accepts an
		* optional `modelValue` schema (v-modelable) and emits the current
		* schema on every mutation.
		*/
		const props = __props;
		const model = useModel(__props, "modelValue");
		let nextAutoId = 0;
		function makeAutoId() {
			nextAutoId += 1;
			return `quiz-builder-${Date.now()}-${nextAutoId}`;
		}
		const fallbackId = ref(makeAutoId());
		const builder = useQuizBuilder(computed(() => props.builderId ?? fallbackId.value).value);
		function isPartialSchema(value) {
			return typeof value === "object" && value !== null;
		}
		onMounted(() => {
			const seed = model.value;
			if (isPartialSchema(seed)) builder.loadSchema(seed);
			activeBankId.value = builder.schema.value.questionBanks[0].id;
		});
		watch(() => builder.schema.value, (next) => {
			model.value = {
				questionBanks: next.questionBanks.map((b) => ({ ...b })),
				questions: next.questions.map((q) => ({
					...q,
					options: q.options.map((o) => ({ ...o }))
				}))
			};
		}, { deep: true });
		const sidebarMode = ref(null);
		/** Active bank id. The schema always has at least one bank. */
		const activeBankId = ref("");
		const activeBank = computed(() => {
			const id = activeBankId.value;
			return builder.schema.value.questionBanks.find((b) => b.id === id) ?? null;
		});
		function setSidebarMode(mode) {
			sidebarMode.value = sidebarMode.value === mode ? null : mode;
		}
		function closeSidebar() {
			sidebarMode.value = null;
		}
		function selectBank(bankId) {
			activeBankId.value = bankId;
			builder.select(null);
		}
		watch(() => builder.schema.value.questionBanks, (banks) => {
			if (!banks.find((b) => b.id === activeBankId.value)) activeBankId.value = banks[0]?.id ?? "";
		}, { deep: true });
		watch(() => props.enableQuestionBanks, (enabled) => {
			if (!enabled && sidebarMode.value === "config") sidebarMode.value = null;
		});
		const DEFAULT_CHIPS = [
			{
				type: "single-choice",
				label: "Single choice",
				icon: CircleDot,
				description: "Pick one correct answer"
			},
			{
				type: "multiple-choice",
				label: "Multiple choice",
				icon: CheckSquare,
				description: "Pick one or more correct answers"
			},
			{
				type: "true-false",
				label: "True / False",
				icon: ToggleRight,
				description: "Binary true/false answer"
			},
			{
				type: "text-match",
				label: "Text match",
				icon: Keyboard,
				description: "Short text answer, auto-graded"
			},
			{
				type: "numeric-range",
				label: "Numeric range",
				icon: Calculator,
				description: "Number answer with optional tolerance"
			},
			{
				type: "essay",
				label: "Essay",
				icon: PenLine,
				description: "Long-form text, manual grading"
			},
			{
				type: "matching",
				label: "Matching",
				icon: Link2,
				description: "Match items in left column to right"
			},
			{
				type: "ordering",
				label: "Ordering",
				icon: ListOrdered,
				description: "Arrange items in the correct sequence"
			},
			{
				type: "fill-blank",
				label: "Fill in the blank",
				icon: Underline,
				description: "Complete sentences with missing words"
			},
			{
				type: "matching-categories",
				label: "Matching categories",
				icon: LayoutGrid,
				description: "Group items into hidden categories"
			},
			{
				type: "ai-analysis",
				label: "AI analysis",
				icon: Sparkles,
				description: "Image submission scored by AI"
			}
		];
		const visibleChips = computed(() => {
			const hide = Array.isArray(props.hideElementTypes) ? new Set(props.hideElementTypes) : null;
			if (!hide) return DEFAULT_CHIPS;
			return DEFAULT_CHIPS.filter((chip) => !hide.has(chip.type));
		});
		function isQuestionGroup(item) {
			return item.type === "question-group";
		}
		function getLucideIcon(name) {
			if (!name) return null;
			return LucideIcons[name.split(/[-_\s]+/).map((w) => w.charAt(0).toUpperCase() + w.slice(1)).join("")] ?? null;
		}
		const expandedGroups = reactive({});
		function toggleGroup(key) {
			expandedGroups[key] = !expandedGroups[key];
		}
		watch(() => props.openAllSections, (open) => {
			if (!open) return;
			props.customElementList?.forEach((item, index) => {
				if (isQuestionGroup(item)) expandedGroups[`custom-${index}`] = true;
			});
		}, { immediate: true });
		function onAddBank() {
			activeBankId.value = builder.addBank();
			sidebarMode.value = "config";
		}
		function onRemoveActiveBank() {
			if (!activeBank.value) return;
			builder.removeBank(activeBank.value.id);
		}
		function patchActiveBank(patch) {
			if (!activeBank.value) return;
			builder.updateBank(activeBank.value.id, patch);
		}
		const canRemoveActiveBank = computed(() => builder.schema.value.questionBanks.length > 1);
		const scopeQuestions = computed(() => builder.schema.value.questions.filter((q) => q.bankId === activeBankId.value));
		function onAddQuestion(type) {
			const id = builder.addQuestion(type, activeBankId.value);
			builder.select(id);
		}
		function onAddCustomQuestion(item) {
			const id = builder.addQuestion(item.type, activeBankId.value);
			builder.updateQuestion(id, {
				prompt: item.label,
				...item.config ?? {}
			});
			builder.select(id);
		}
		function onQuestionClick(questionId) {
			builder.select(questionId);
		}
		const selectedQuestion = computed(() => {
			const sel = builder.selection.value;
			if (!sel.id) return null;
			return builder.schema.value.questions.find((q) => q.id === sel.id) ?? null;
		});
		/** True for choice question types — the only ones that use `options[]`. */
		const selectedHasOptions = computed(() => {
			const q = selectedQuestion.value;
			if (!q) return false;
			return q.type === "single-choice" || q.type === "multiple-choice";
		});
		const inspectorTab = ref("general");
		/** Patch the nested `feedback` object on the selected question. */
		function patchFeedback(patch) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ feedback: {
				...q.feedback ?? {},
				...patch
			} });
		}
		function makeId(prefix) {
			return `${prefix}-${Date.now()}-${Math.floor(Math.random() * 1e6)}`;
		}
		function setCorrectAnswerAt(index, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			const next = [...q.correctAnswers ?? []];
			next[index] = value;
			patchSelectedQuestion({ correctAnswers: next });
		}
		function addCorrectAnswer() {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ correctAnswers: [...q.correctAnswers ?? [], ""] });
		}
		function removeCorrectAnswer(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ correctAnswers: (q.correctAnswers ?? []).filter((_, i) => i !== index) });
		}
		function setMatchPairField(index, field, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			const next = [...q.matchPairs ?? []];
			next[index] = {
				...next[index],
				[field]: value
			};
			patchSelectedQuestion({ matchPairs: next });
		}
		function addMatchPair() {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ matchPairs: [...q.matchPairs ?? [], {
				left: "",
				right: ""
			}] });
		}
		function removeMatchPair(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ matchPairs: (q.matchPairs ?? []).filter((_, i) => i !== index) });
		}
		function setOrderItemAt(index, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			const next = [...q.correctOrder ?? []];
			next[index] = value;
			patchSelectedQuestion({ correctOrder: next });
		}
		function addOrderItem() {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ correctOrder: [...q.correctOrder ?? [], ""] });
		}
		function removeOrderItem(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ correctOrder: (q.correctOrder ?? []).filter((_, i) => i !== index) });
		}
		function setBlankAnswerAt(blankIdx, answerIdx, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ blanks: (q.blanks ?? []).map((b, i) => {
				if (i !== blankIdx) return b;
				const answers = [...b.answers];
				answers[answerIdx] = value;
				return {
					...b,
					answers
				};
			}) });
		}
		function addBlankAnswer(blankIdx) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ blanks: (q.blanks ?? []).map((b, i) => i === blankIdx ? {
				...b,
				answers: [...b.answers, ""]
			} : b) });
		}
		function removeBlankAnswer(blankIdx, answerIdx) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ blanks: (q.blanks ?? []).map((b, i) => i === blankIdx ? {
				...b,
				answers: b.answers.filter((_, j) => j !== answerIdx)
			} : b) });
		}
		function addBlank() {
			const q = selectedQuestion.value;
			if (!q) return;
			const newBlank = {
				id: makeId("blank"),
				answers: [""]
			};
			patchSelectedQuestion({ blanks: [...q.blanks ?? [], newBlank] });
		}
		function removeBlank(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ blanks: (q.blanks ?? []).filter((_, i) => i !== index) });
		}
		function setCategoryField(index, field, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ categories: (q.categories ?? []).map((c, i) => i === index ? {
				...c,
				[field]: value
			} : c) });
		}
		function setCategoryItemAt(catIdx, itemIdx, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ categories: (q.categories ?? []).map((c, i) => {
				if (i !== catIdx) return c;
				const items = [...c.items];
				items[itemIdx] = value;
				return {
					...c,
					items
				};
			}) });
		}
		function addCategory() {
			const q = selectedQuestion.value;
			if (!q) return;
			const count = q.itemsPerCategory ?? 4;
			const newCat = {
				slug: makeId("cat"),
				label: "",
				items: Array.from({ length: count }, () => "")
			};
			patchSelectedQuestion({ categories: [...q.categories ?? [], newCat] });
		}
		function removeCategory(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ categories: (q.categories ?? []).filter((_, i) => i !== index) });
		}
		function setCriterionField(index, field, value) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ aiCriteria: (q.aiCriteria ?? []).map((c, i) => i === index ? {
				...c,
				[field]: value
			} : c) });
		}
		function addCriterion() {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ aiCriteria: [...q.aiCriteria ?? [], {
				key: makeId("crit"),
				name: "",
				description: "",
				points: 100
			}] });
		}
		function removeCriterion(index) {
			const q = selectedQuestion.value;
			if (!q) return;
			patchSelectedQuestion({ aiCriteria: (q.aiCriteria ?? []).filter((_, i) => i !== index) });
		}
		function parseNumber(value) {
			const n = Number.parseFloat(value);
			return Number.isFinite(n) ? n : 0;
		}
		function onRemoveQuestion() {
			const sel = builder.selection.value;
			if (sel.id) builder.removeQuestion(sel.id);
		}
		function onClearSelection() {
			builder.select(null);
		}
		function patchSelectedQuestion(patch) {
			const sel = builder.selection.value;
			if (sel.id) builder.updateQuestion(sel.id, patch);
		}
		function onAddOption() {
			const sel = builder.selection.value;
			if (sel.id) builder.addOption(sel.id);
		}
		function onRemoveOption(optionId) {
			const sel = builder.selection.value;
			if (sel.id) builder.removeOption(sel.id, optionId);
		}
		function patchOption(optionId, patch) {
			const sel = builder.selection.value;
			if (sel.id) builder.updateOption(sel.id, optionId, patch);
		}
		function parseScore(value) {
			const n = Number.parseFloat(value);
			return Number.isFinite(n) ? n : 0;
		}
		const outerGridColumns = computed(() => {
			const parts = ["2.75rem"];
			if (sidebarMode.value !== null) parts.push("240px");
			parts.push("1fr");
			parts.push(selectedQuestion.value ? "280px" : "2rem");
			return parts.join(" ");
		});
		/** Whether the overall height is capped (enables internal column scroll). */
		const heightCapped = computed(() => props.maxHeight !== "none");
		function makeDragGhost(label) {
			const ghost = document.createElement("div");
			ghost.style.cssText = "position:fixed;pointer-events:none;z-index:9999;display:flex;align-items:center;justify-content:space-between;gap:8px;min-width:160px;padding:4px 8px;border-radius:4px;font-size:0.75rem;line-height:1rem;font-family:inherit;color:var(--foreground,inherit);background:var(--accent,#f1f5f9);box-shadow:0 4px 16px rgba(0,0,0,.15);opacity:0.95;";
			const labelSpan = document.createElement("span");
			labelSpan.textContent = label;
			labelSpan.style.cssText = "flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;";
			const svg = document.createElementNS("http://www.w3.org/2000/svg", "svg");
			svg.setAttribute("viewBox", "0 0 24 24");
			svg.setAttribute("width", "12");
			svg.setAttribute("height", "12");
			svg.setAttribute("fill", "none");
			svg.setAttribute("stroke", "currentColor");
			svg.setAttribute("stroke-width", "2");
			svg.setAttribute("stroke-linecap", "round");
			svg.setAttribute("stroke-linejoin", "round");
			svg.style.cssText = "flex-shrink:0;opacity:0.5;";
			for (const [cx, cy] of [
				[9, 5],
				[9, 12],
				[9, 19],
				[15, 5],
				[15, 12],
				[15, 19]
			]) {
				const c = document.createElementNS("http://www.w3.org/2000/svg", "circle");
				c.setAttribute("cx", String(cx));
				c.setAttribute("cy", String(cy));
				c.setAttribute("r", "1");
				svg.appendChild(c);
			}
			ghost.appendChild(labelSpan);
			ghost.appendChild(svg);
			ghost.style.visibility = "hidden";
			ghost.style.left = "0px";
			ghost.style.top = "0px";
			document.body.appendChild(ghost);
			const offsetX = ghost.offsetWidth - 14;
			const offsetY = ghost.offsetHeight / 2;
			ghost.style.visibility = "";
			return {
				ghost,
				offsetX,
				offsetY
			};
		}
		const activeAddDrag = ref(null);
		const addDropTargetIndex = ref(null);
		function beginAddDrag(item, event) {
			if (event.button !== 0) return;
			if (props.disabled || props.readonly) return;
			event.preventDefault();
			event.stopPropagation();
			const { ghost, offsetX, offsetY } = makeDragGhost(item.label);
			ghost.style.left = `${event.clientX - offsetX}px`;
			ghost.style.top = `${event.clientY - offsetY}px`;
			document.body.style.cursor = "grabbing";
			const target = event.target;
			try {
				target.setPointerCapture(event.pointerId);
			} catch {}
			activeAddDrag.value = {
				item,
				ghost,
				pointerId: event.pointerId,
				captureTarget: target,
				offsetX,
				offsetY
			};
			addDropTargetIndex.value = null;
			window.addEventListener("pointermove", onAddPointerMove);
			window.addEventListener("pointerup", onAddPointerUp);
			window.addEventListener("pointercancel", onAddPointerUp);
		}
		function onAddPointerMove(event) {
			const state = activeAddDrag.value;
			if (!state) return;
			state.ghost.style.left = `${event.clientX - state.offsetX}px`;
			state.ghost.style.top = `${event.clientY - state.offsetY}px`;
			const el = document.elementFromPoint(event.clientX, event.clientY);
			if (!el) {
				addDropTargetIndex.value = null;
				return;
			}
			if (!el.closest("[data-drag-surface='quiz-layers']")) {
				addDropTargetIndex.value = null;
				return;
			}
			const blockEl = el.closest("[data-question-block-index]");
			if (blockEl) {
				const idx = Number.parseInt(blockEl.dataset.questionBlockIndex ?? "-1", 10);
				if (idx >= 0) {
					addDropTargetIndex.value = idx;
					return;
				}
			}
			addDropTargetIndex.value = scopeQuestions.value.length;
		}
		function onAddPointerUp(_event) {
			const state = activeAddDrag.value;
			if (!state) {
				cleanupAddDrag();
				return;
			}
			try {
				state.captureTarget.releasePointerCapture(state.pointerId);
			} catch {}
			if (addDropTargetIndex.value !== null) {
				const targetIdx = addDropTargetIndex.value;
				const newId = builder.addQuestion(state.item.type, activeBankId.value);
				if (state.item.config || state.item.label) {
					const patch = { ...state.item.config ?? {} };
					if (state.item.label && !patch.prompt) patch.prompt = state.item.label;
					builder.updateQuestion(newId, patch);
				}
				if (targetIdx < scopeQuestions.value.length - 1) builder.reorderQuestionInBank(activeBankId.value, newId, targetIdx);
				builder.select(newId);
			}
			cleanupAddDrag();
		}
		function cleanupAddDrag() {
			activeAddDrag.value?.ghost.remove();
			document.body.style.cursor = "";
			activeAddDrag.value = null;
			addDropTargetIndex.value = null;
			window.removeEventListener("pointermove", onAddPointerMove);
			window.removeEventListener("pointerup", onAddPointerUp);
			window.removeEventListener("pointercancel", onAddPointerUp);
		}
		const activeReorderDrag = ref(null);
		const reorderDropIndex = ref(null);
		function beginReorderDrag(questionId, fromIndex, event) {
			if (event.button !== 0) return;
			if (props.disabled || props.readonly) return;
			event.preventDefault();
			event.stopPropagation();
			const { ghost, offsetX, offsetY } = makeDragGhost(builder.schema.value.questions.find((qq) => qq.id === questionId)?.prompt || "Question");
			ghost.style.left = `${event.clientX - offsetX}px`;
			ghost.style.top = `${event.clientY - offsetY}px`;
			document.body.style.cursor = "grabbing";
			const target = event.target;
			try {
				target.setPointerCapture(event.pointerId);
			} catch {}
			activeReorderDrag.value = {
				questionId,
				fromIndex,
				pointerId: event.pointerId,
				captureTarget: target,
				ghost,
				offsetX,
				offsetY
			};
			reorderDropIndex.value = fromIndex;
			window.addEventListener("pointermove", onReorderPointerMove);
			window.addEventListener("pointerup", onReorderPointerUp);
			window.addEventListener("pointercancel", onReorderPointerUp);
		}
		function onReorderPointerMove(event) {
			const state = activeReorderDrag.value;
			if (!state) return;
			state.ghost.style.left = `${event.clientX - state.offsetX}px`;
			state.ghost.style.top = `${event.clientY - state.offsetY}px`;
			const el = document.elementFromPoint(event.clientX, event.clientY);
			if (!el) return;
			if (!el.closest("[data-drag-surface='quiz-layers']")) return;
			const blockEl = el.closest("[data-question-block-index]");
			if (blockEl) {
				const idx = Number.parseInt(blockEl.dataset.questionBlockIndex ?? "-1", 10);
				if (idx >= 0) {
					reorderDropIndex.value = idx;
					return;
				}
			}
			reorderDropIndex.value = scopeQuestions.value.length - 1;
		}
		function onReorderPointerUp(_event) {
			const state = activeReorderDrag.value;
			if (!state) {
				cleanupReorderDrag();
				return;
			}
			try {
				state.captureTarget.releasePointerCapture(state.pointerId);
			} catch {}
			if (reorderDropIndex.value !== null && reorderDropIndex.value !== state.fromIndex) builder.reorderQuestionInBank(activeBankId.value, state.questionId, reorderDropIndex.value);
			cleanupReorderDrag();
		}
		function cleanupReorderDrag() {
			activeReorderDrag.value?.ghost.remove();
			document.body.style.cursor = "";
			activeReorderDrag.value = null;
			reorderDropIndex.value = null;
			window.removeEventListener("pointermove", onReorderPointerMove);
			window.removeEventListener("pointerup", onReorderPointerUp);
			window.removeEventListener("pointercancel", onReorderPointerUp);
		}
		onBeforeUnmount(() => {
			cleanupAddDrag();
			cleanupReorderDrag();
		});
		return (_ctx, _cache) => {
			return openBlock(), createElementBlock("div", {
				class: normalizeClass(unref(cn)("gxp-quiz-builder grid gap-3 rounded-lg border bg-card", heightCapped.value ? "overflow-hidden" : "", props.classList)),
				style: normalizeStyle({
					gridTemplateColumns: outerGridColumns.value,
					gridTemplateRows: heightCapped.value ? "minmax(0, 1fr)" : void 0,
					minHeight: "24rem",
					maxHeight: heightCapped.value ? props.maxHeight : void 0,
					transition: "grid-template-columns 200ms ease"
				}),
				"data-testid": "quiz-builder",
				"data-element-name": props.name ?? void 0
			}, [
				createElementVNode("nav", _hoisted_2, [
					createElementVNode("button", {
						type: "button",
						class: normalizeClass(["flex h-7 w-7 items-center justify-center rounded-md transition-colors", sidebarMode.value === "palette" ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-accent/40 hover:text-foreground"]),
						"aria-pressed": sidebarMode.value === "palette",
						title: "Question types",
						"data-testid": "quiz-builder-nav-palette",
						onClick: _cache[0] || (_cache[0] = ($event) => setSidebarMode("palette"))
					}, [createVNode(unref(CirclePlus), { class: "h-4 w-4" })], 10, _hoisted_3),
					props.enableQuestionBanks ? (openBlock(), createElementBlock("button", {
						key: 0,
						type: "button",
						class: normalizeClass(["flex h-7 w-7 items-center justify-center rounded-md transition-colors", sidebarMode.value === "config" ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-accent/40 hover:text-foreground"]),
						"aria-pressed": sidebarMode.value === "config",
						title: activeBank.value ? `Configure “${activeBank.value.name}”` : "Bank configuration",
						"data-testid": "quiz-builder-nav-config",
						onClick: _cache[1] || (_cache[1] = ($event) => setSidebarMode("config"))
					}, [createVNode(unref(Settings), { class: "h-4 w-4" })], 10, _hoisted_4)) : createCommentVNode("", true),
					props.enableQuestionBanks ? (openBlock(), createElementBlock("div", _hoisted_5)) : createCommentVNode("", true),
					props.enableQuestionBanks ? (openBlock(), createElementBlock(Fragment, { key: 2 }, [(openBlock(true), createElementBlock(Fragment, null, renderList(unref(builder).schema.value.questionBanks, (bank) => {
						return openBlock(), createElementBlock("button", {
							key: bank.id,
							type: "button",
							class: normalizeClass(["flex h-7 w-7 items-center justify-center rounded-md transition-colors", activeBankId.value === bank.id ? "bg-accent text-accent-foreground" : "text-muted-foreground hover:bg-accent/40 hover:text-foreground"]),
							"aria-pressed": activeBankId.value === bank.id,
							title: bank.name,
							"data-testid": `quiz-builder-nav-bank-${bank.id}`,
							onClick: ($event) => selectBank(bank.id)
						}, [createVNode(unref(Database), { class: "h-4 w-4" })], 10, _hoisted_6);
					}), 128)), createElementVNode("button", {
						type: "button",
						class: "mt-1 flex h-7 w-7 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent/40 hover:text-foreground",
						disabled: props.disabled || props.readonly,
						title: "Add bank",
						"data-testid": "quiz-builder-bank-add",
						onClick: onAddBank
					}, [createVNode(unref(LayersPlus), { class: "h-4 w-4" })], 8, _hoisted_7)], 64)) : createCommentVNode("", true)
				]),
				sidebarMode.value === "palette" ? (openBlock(), createElementBlock("aside", _hoisted_8, [createElementVNode("header", _hoisted_9, [createElementVNode("h4", _hoisted_10, toDisplayString(props.label ?? "Question types"), 1), createVNode(unref(Button_default), {
					variant: "ghost",
					size: "icon-sm",
					class: "-mr-1 shrink-0",
					"aria-label": "Close palette",
					"data-testid": "quiz-builder-palette-close",
					onClick: closeSidebar
				}, {
					default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
					_: 1
				})]), createElementVNode("div", _hoisted_11, [
					props.customElementList ? (openBlock(), createElementBlock("div", _hoisted_12, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.customElementList, (item, index) => {
						return openBlock(), createElementBlock(Fragment, { key: index }, [isQuestionGroup(item) ? (openBlock(), createElementBlock("div", _hoisted_13, [createElementVNode("button", {
							type: "button",
							class: "flex w-full items-center justify-between gap-2 rounded-md px-2 py-1.5 text-left text-xs transition-colors hover:bg-accent/30",
							"data-testid": `quiz-builder-palette-group-${index}`,
							onClick: ($event) => toggleGroup(`custom-${index}`)
						}, [createElementVNode("span", _hoisted_15, toDisplayString(item.label), 1), createVNode(unref(ChevronRight), { class: normalizeClass(["h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform duration-150", expandedGroups[`custom-${index}`] ? "rotate-90" : ""]) }, null, 8, ["class"])], 8, _hoisted_14), expandedGroups[`custom-${index}`] ? (openBlock(), createElementBlock("div", _hoisted_16, [props.dragToAdd ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(item.questions, (q, qIndex) => {
							return openBlock(), createElementBlock("div", {
								key: `${q.type}-${q.label}-${qIndex}`,
								class: "flex cursor-grab items-center justify-between rounded px-2 py-1 text-xs select-none transition-colors hover:bg-accent/50 active:bg-accent/70 active:cursor-grabbing",
								"data-testid": `quiz-builder-palette-custom-${q.type}-${qIndex}`,
								onPointerdown: (e) => beginAddDrag({
									type: q.type,
									label: q.label,
									config: q.config
								}, e)
							}, [createElementVNode("span", _hoisted_18, [getLucideIcon(q.icon) ? (openBlock(), createBlock(resolveDynamicComponent(getLucideIcon(q.icon)), {
								key: 0,
								class: "h-3 w-3 shrink-0 text-muted-foreground"
							})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(q.label), 1)]), createVNode(unref(GripVertical), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 40, _hoisted_17);
						}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(item.questions, (q, qIndex) => {
							return openBlock(), createElementBlock("button", {
								key: `${q.type}-${q.label}-${qIndex}`,
								type: "button",
								class: "flex items-center justify-between gap-1.5 rounded px-2 py-1 text-left text-xs transition-colors hover:bg-accent/50 active:bg-accent/70 disabled:opacity-50",
								"data-testid": `quiz-builder-palette-custom-${q.type}-${qIndex}`,
								disabled: props.disabled || props.readonly,
								onClick: ($event) => onAddCustomQuestion(q)
							}, [createElementVNode("span", _hoisted_20, [getLucideIcon(q.icon) ? (openBlock(), createBlock(resolveDynamicComponent(getLucideIcon(q.icon)), {
								key: 0,
								class: "h-3 w-3 shrink-0 text-muted-foreground"
							})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(q.label), 1)]), createVNode(unref(Plus), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 8, _hoisted_19);
						}), 128))])) : createCommentVNode("", true)])) : props.dragToAdd ? (openBlock(), createElementBlock("div", {
							key: 1,
							class: "flex cursor-grab items-center justify-between rounded px-2 py-1 text-xs select-none transition-colors hover:bg-accent/50 active:bg-accent/70 active:cursor-grabbing",
							"data-testid": `quiz-builder-palette-custom-${item.type}-${index}`,
							onPointerdown: (e) => beginAddDrag({
								type: item.type,
								label: item.label,
								config: item.config
							}, e)
						}, [createElementVNode("span", _hoisted_22, [getLucideIcon(item.icon) ? (openBlock(), createBlock(resolveDynamicComponent(getLucideIcon(item.icon)), {
							key: 0,
							class: "h-3 w-3 shrink-0 text-muted-foreground"
						})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)]), createVNode(unref(GripVertical), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 40, _hoisted_21)) : (openBlock(), createElementBlock("button", {
							key: 2,
							type: "button",
							class: "flex items-center justify-between gap-1.5 rounded px-2 py-1 text-left text-xs transition-colors hover:bg-accent/50 active:bg-accent/70 disabled:opacity-50",
							"data-testid": `quiz-builder-palette-custom-${item.type}-${index}`,
							disabled: props.disabled || props.readonly,
							onClick: ($event) => onAddCustomQuestion(item)
						}, [createElementVNode("span", _hoisted_24, [getLucideIcon(item.icon) ? (openBlock(), createBlock(resolveDynamicComponent(getLucideIcon(item.icon)), {
							key: 0,
							class: "h-3 w-3 shrink-0 text-muted-foreground"
						})) : createCommentVNode("", true), createTextVNode(" " + toDisplayString(item.label), 1)]), createVNode(unref(Plus), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 8, _hoisted_23))], 64);
					}), 128))])) : (openBlock(), createElementBlock("div", _hoisted_25, [props.dragToAdd ? (openBlock(true), createElementBlock(Fragment, { key: 0 }, renderList(visibleChips.value, (chip) => {
						return openBlock(), createElementBlock("div", {
							key: chip.type,
							class: "flex cursor-grab items-center justify-between gap-1.5 rounded px-2 py-1 text-xs select-none transition-colors hover:bg-accent/50 active:bg-accent/70 active:cursor-grabbing",
							"data-testid": `quiz-builder-palette-${chip.type}`,
							onPointerdown: (e) => beginAddDrag({
								type: chip.type,
								label: chip.label
							}, e)
						}, [createElementVNode("span", _hoisted_27, [(openBlock(), createBlock(resolveDynamicComponent(chip.icon), { class: "h-3 w-3 shrink-0 text-muted-foreground" })), createTextVNode(" " + toDisplayString(chip.label), 1)]), createVNode(unref(GripVertical), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 40, _hoisted_26);
					}), 128)) : (openBlock(true), createElementBlock(Fragment, { key: 1 }, renderList(visibleChips.value, (chip) => {
						return openBlock(), createElementBlock("button", {
							key: chip.type,
							type: "button",
							class: "flex items-center justify-between gap-1.5 rounded px-2 py-1 text-left text-xs transition-colors hover:bg-accent/50 active:bg-accent/70 disabled:opacity-50",
							"data-testid": `quiz-builder-palette-${chip.type}`,
							disabled: props.disabled || props.readonly,
							onClick: ($event) => onAddQuestion(chip.type)
						}, [createElementVNode("span", _hoisted_29, [(openBlock(), createBlock(resolveDynamicComponent(chip.icon), { class: "h-3 w-3 shrink-0 text-muted-foreground" })), createTextVNode(" " + toDisplayString(chip.label), 1)]), createVNode(unref(Plus), { class: "h-3 w-3 shrink-0 text-muted-foreground" })], 8, _hoisted_28);
					}), 128))])),
					props.helpText ? (openBlock(), createElementBlock("p", _hoisted_30, toDisplayString(props.helpText), 1)) : createCommentVNode("", true),
					props.errors.length ? (openBlock(), createElementBlock("ul", _hoisted_31, [(openBlock(true), createElementBlock(Fragment, null, renderList(props.errors, (err, i) => {
						return openBlock(), createElementBlock("li", { key: i }, toDisplayString(err), 1);
					}), 128))])) : createCommentVNode("", true)
				])])) : sidebarMode.value === "config" && activeBank.value ? (openBlock(), createElementBlock("aside", _hoisted_32, [createElementVNode("header", _hoisted_33, [_cache[34] || (_cache[34] = createElementVNode("h4", { class: "flex-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground" }, " Bank settings ", -1)), createVNode(unref(Button_default), {
					variant: "ghost",
					size: "icon-sm",
					class: "-mr-1 shrink-0",
					"aria-label": "Close bank settings",
					"data-testid": "quiz-builder-config-close",
					onClick: closeSidebar
				}, {
					default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
					_: 1
				})]), createElementVNode("div", _hoisted_34, [
					createElementVNode("div", _hoisted_35, [createVNode(unref(Label_default), { for: "qb-bank-name" }, {
						default: withCtx(() => [..._cache[35] || (_cache[35] = [createTextVNode("Name", -1)])]),
						_: 1
					}), createVNode(unref(Input_default), {
						id: "qb-bank-name",
						"model-value": activeBank.value.name,
						"data-testid": "quiz-builder-config-name",
						onInput: _cache[2] || (_cache[2] = (e) => patchActiveBank({ name: e.target.value }))
					}, null, 8, ["model-value"])]),
					createElementVNode("div", _hoisted_36, [createVNode(unref(Label_default), { for: "qb-bank-description" }, {
						default: withCtx(() => [..._cache[36] || (_cache[36] = [createTextVNode("Description", -1)])]),
						_: 1
					}), createVNode(unref(Textarea_default), {
						id: "qb-bank-description",
						"model-value": activeBank.value.description ?? "",
						"data-testid": "quiz-builder-config-description",
						onInput: _cache[3] || (_cache[3] = (e) => patchActiveBank({ description: e.target.value }))
					}, null, 8, ["model-value"])]),
					canRemoveActiveBank.value ? (openBlock(), createBlock(unref(Button_default), {
						key: 0,
						variant: "destructive",
						size: "sm",
						class: "self-start",
						"data-testid": "quiz-builder-config-remove",
						onClick: onRemoveActiveBank
					}, {
						default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" }), _cache[37] || (_cache[37] = createTextVNode(" Delete bank ", -1))]),
						_: 1
					})) : (openBlock(), createElementBlock("p", _hoisted_37, " At least one bank must remain. "))
				])])) : createCommentVNode("", true),
				createElementVNode("section", _hoisted_38, [props.enableQuestionBanks && activeBank.value ? (openBlock(), createElementBlock("header", _hoisted_39, [createElementVNode("div", _hoisted_40, [
					createVNode(unref(Database), { class: "h-4 w-4 shrink-0 text-muted-foreground" }),
					createElementVNode("h4", {
						class: "truncate text-sm font-semibold",
						"data-testid": `quiz-builder-bank-${activeBank.value.id}-name`
					}, toDisplayString(activeBank.value.name), 9, _hoisted_41),
					createVNode(unref(Badge_default), {
						variant: "outline",
						class: "font-mono text-[10px]"
					}, {
						default: withCtx(() => [createTextVNode(toDisplayString(scopeQuestions.value.length) + " question" + toDisplayString(scopeQuestions.value.length === 1 ? "" : "s"), 1)]),
						_: 1
					})
				])])) : createCommentVNode("", true), scopeQuestions.value.length === 0 ? (openBlock(), createElementBlock("p", {
					key: 1,
					class: normalizeClass(["rounded border border-dashed bg-muted/20 py-6 text-center text-xs text-muted-foreground", activeAddDrag.value ? "border-primary/60 bg-primary/5 text-primary" : ""]),
					"data-testid": "quiz-builder-canvas-empty"
				}, toDisplayString(props.dragToAdd ? "Drag a question type from the palette." : "Open the palette and pick a question type."), 3)) : (openBlock(), createElementBlock("ul", _hoisted_42, [(openBlock(true), createElementBlock(Fragment, null, renderList(scopeQuestions.value, (q, index) => {
					return openBlock(), createElementBlock(Fragment, { key: q.id }, [activeAddDrag.value && addDropTargetIndex.value === index || activeReorderDrag.value && reorderDropIndex.value === index && activeReorderDrag.value.questionId !== q.id ? (openBlock(), createElementBlock("div", _hoisted_43, [..._cache[38] || (_cache[38] = [createElementVNode("div", { class: "absolute inset-x-0 -top-px flex items-center" }, [createElementVNode("span", { class: "block h-2 w-2 shrink-0 rounded-full bg-primary" }), createElementVNode("span", { class: "block h-px flex-1 bg-primary/80" })], -1)])])) : createCommentVNode("", true), createElementVNode("li", {
						"data-question-block-index": index,
						class: normalizeClass(["group/row flex cursor-pointer items-center gap-2 rounded border bg-background px-1.5 py-1.5 transition-colors", [unref(builder).selection.value.id === q.id ? "border-primary bg-accent/30" : "hover:border-primary/40", activeReorderDrag.value?.questionId === q.id ? "opacity-40" : ""]]),
						"data-testid": `quiz-builder-row-${q.id}`,
						onClick: ($event) => onQuestionClick(q.id)
					}, [
						createElementVNode("span", {
							class: "shrink-0 cursor-grab touch-none rounded-sm bg-muted/60 px-0.5 py-0.5 opacity-60 transition-opacity hover:opacity-100 active:cursor-grabbing",
							title: "Drag to reorder",
							"data-testid": `quiz-builder-row-${q.id}-handle`,
							onClick: _cache[4] || (_cache[4] = withModifiers(() => {}, ["stop"])),
							onPointerdown: withModifiers((e) => beginReorderDrag(q.id, index, e), ["stop"])
						}, [createVNode(unref(GripVertical), { class: "h-3 w-3 text-muted-foreground" })], 40, _hoisted_45),
						createElementVNode("span", _hoisted_46, toDisplayString(index + 1) + ". ", 1),
						createElementVNode("span", _hoisted_47, [createElementVNode("span", _hoisted_48, toDisplayString(q.prompt), 1), createElementVNode("span", _hoisted_49, toDisplayString(q.options.length) + " option(s) ", 1)]),
						createVNode(unref(Badge_default), {
							variant: "secondary",
							class: "ml-auto font-mono text-[9px]"
						}, {
							default: withCtx(() => [createTextVNode(toDisplayString(q.type), 1)]),
							_: 2
						}, 1024)
					], 10, _hoisted_44)], 64);
				}), 128)), activeAddDrag.value && addDropTargetIndex.value === scopeQuestions.value.length || activeReorderDrag.value && reorderDropIndex.value === scopeQuestions.value.length - 1 ? (openBlock(), createElementBlock("div", _hoisted_50, [..._cache[39] || (_cache[39] = [createElementVNode("div", { class: "absolute inset-x-0 -top-px flex items-center" }, [createElementVNode("span", { class: "block h-2 w-2 shrink-0 rounded-full bg-primary" }), createElementVNode("span", { class: "block h-px flex-1 bg-primary/80" })], -1)])])) : createCommentVNode("", true)]))]),
				!selectedQuestion.value ? (openBlock(), createElementBlock("aside", _hoisted_51, [createVNode(unref(TooltipProvider_default), null, {
					default: withCtx(() => [createVNode(unref(Tooltip_default), null, {
						default: withCtx(() => [createVNode(unref(TooltipTrigger_default), { "as-child": "" }, {
							default: withCtx(() => [createElementVNode("span", _hoisted_52, [createVNode(unref(Info), { class: "h-4 w-4" })])]),
							_: 1
						}), createVNode(unref(TooltipContent_default), { side: "left" }, {
							default: withCtx(() => [..._cache[40] || (_cache[40] = [createTextVNode(" Select a question on the canvas to edit its properties ", -1)])]),
							_: 1
						})]),
						_: 1
					})]),
					_: 1
				})])) : (openBlock(), createElementBlock("aside", _hoisted_53, [
					createElementVNode("header", _hoisted_54, [_cache[41] || (_cache[41] = createElementVNode("span", { class: "truncate text-[10px] font-semibold uppercase tracking-wider text-muted-foreground" }, " Question ", -1)), createVNode(unref(Button_default), {
						variant: "ghost",
						size: "icon-sm",
						class: "-mr-1 shrink-0",
						"aria-label": "Clear selection",
						onClick: onClearSelection
					}, {
						default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
						_: 1
					})]),
					createElementVNode("div", _hoisted_55, [
						createElementVNode("button", {
							type: "button",
							role: "tab",
							class: normalizeClass(["-mb-px flex flex-1 items-center justify-center gap-1.5 border-b-2 py-1.5 transition-colors", inspectorTab.value === "general" ? "border-primary text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"]),
							"aria-selected": inspectorTab.value === "general",
							title: "General",
							"data-testid": "quiz-builder-inspector-tab-general",
							onClick: _cache[5] || (_cache[5] = ($event) => inspectorTab.value = "general")
						}, [createVNode(unref(Settings), { class: "h-4 w-4" })], 10, _hoisted_56),
						createElementVNode("button", {
							type: "button",
							role: "tab",
							class: normalizeClass(["-mb-px flex flex-1 items-center justify-center gap-1.5 border-b-2 py-1.5 transition-colors", inspectorTab.value === "options" ? "border-primary text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"]),
							"aria-selected": inspectorTab.value === "options",
							title: "Options",
							"data-testid": "quiz-builder-inspector-tab-options",
							onClick: _cache[6] || (_cache[6] = ($event) => inspectorTab.value = "options")
						}, [createVNode(unref(ListChecks), { class: "h-4 w-4" })], 10, _hoisted_57),
						createElementVNode("button", {
							type: "button",
							role: "tab",
							class: normalizeClass(["-mb-px flex flex-1 items-center justify-center gap-1.5 border-b-2 py-1.5 transition-colors", inspectorTab.value === "grading" ? "border-primary text-foreground" : "border-transparent text-muted-foreground hover:text-foreground"]),
							"aria-selected": inspectorTab.value === "grading",
							title: "Grading",
							"data-testid": "quiz-builder-inspector-tab-grading",
							onClick: _cache[7] || (_cache[7] = ($event) => inspectorTab.value = "grading")
						}, [createVNode(unref(GraduationCap), { class: "h-4 w-4" })], 10, _hoisted_58)
					]),
					createElementVNode("div", {
						class: "flex flex-col gap-3",
						"data-testid": "quiz-builder-inspector-fields",
						"data-active-tab": inspectorTab.value,
						role: "tabpanel"
					}, [
						withDirectives(createElementVNode("div", _hoisted_60, [
							createElementVNode("div", _hoisted_61, [createVNode(unref(Label_default), { for: "qb-prompt" }, {
								default: withCtx(() => [..._cache[42] || (_cache[42] = [createTextVNode("Prompt", -1)])]),
								_: 1
							}), createVNode(unref(Input_default), {
								id: "qb-prompt",
								"model-value": selectedQuestion.value.prompt,
								"data-testid": "quiz-builder-inspector-prompt",
								onInput: _cache[8] || (_cache[8] = (e) => patchSelectedQuestion({ prompt: e.target.value }))
							}, null, 8, ["model-value"])]),
							createElementVNode("div", _hoisted_62, [createVNode(unref(Label_default), { for: "qb-type" }, {
								default: withCtx(() => [..._cache[43] || (_cache[43] = [createTextVNode("Type", -1)])]),
								_: 1
							}), createVNode(unref(Select_default), {
								"model-value": selectedQuestion.value.type,
								"onUpdate:modelValue": _cache[9] || (_cache[9] = (v) => patchSelectedQuestion({ type: v }))
							}, {
								default: withCtx(() => [createVNode(unref(SelectTrigger_default), {
									id: "qb-type",
									"data-testid": "quiz-builder-inspector-type"
								}, {
									default: withCtx(() => [createVNode(unref(SelectValue_default), { placeholder: "Question type" })]),
									_: 1
								}), createVNode(unref(SelectContent_default), null, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(visibleChips.value, (chip) => {
										return openBlock(), createBlock(unref(SelectItem_default), {
											key: chip.type,
											value: chip.type
										}, {
											default: withCtx(() => [createTextVNode(toDisplayString(chip.label), 1)]),
											_: 2
										}, 1032, ["value"]);
									}), 128))]),
									_: 1
								})]),
								_: 1
							}, 8, ["model-value"])]),
							createElementVNode("div", _hoisted_63, [createVNode(unref(Label_default), { for: "qb-help" }, {
								default: withCtx(() => [..._cache[44] || (_cache[44] = [createTextVNode("Help text", -1)])]),
								_: 1
							}), createVNode(unref(Textarea_default), {
								id: "qb-help",
								"model-value": selectedQuestion.value.helpText ?? "",
								"data-testid": "quiz-builder-inspector-help",
								onInput: _cache[10] || (_cache[10] = (e) => patchSelectedQuestion({ helpText: e.target.value }))
							}, null, 8, ["model-value"])]),
							createElementVNode("div", _hoisted_64, [createVNode(unref(Label_default), { for: "qb-required" }, {
								default: withCtx(() => [..._cache[45] || (_cache[45] = [createTextVNode("Required", -1)])]),
								_: 1
							}), createVNode(unref(Switch_default), {
								id: "qb-required",
								"model-value": Boolean(selectedQuestion.value.required),
								"data-testid": "quiz-builder-inspector-required",
								"onUpdate:modelValue": _cache[11] || (_cache[11] = (v) => patchSelectedQuestion({ required: v }))
							}, null, 8, ["model-value"])])
						], 512), [[vShow, inspectorTab.value === "general"]]),
						withDirectives(createElementVNode("div", _hoisted_65, [
							selectedHasOptions.value ? (openBlock(), createBlock(unref(Card_default), {
								key: 0,
								class: "border-dashed"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[47] || (_cache[47] = createElementVNode("span", null, "options", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-option",
											onClick: onAddOption
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[46] || (_cache[46] = createTextVNode(" Add option ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.options, (opt) => {
										return openBlock(), createElementBlock("div", {
											key: opt.id,
											class: "flex flex-col gap-1 rounded border bg-background p-2",
											"data-testid": `quiz-builder-inspector-option-${opt.id}`
										}, [
											createElementVNode("div", _hoisted_67, [createElementVNode("div", _hoisted_68, [createVNode(unref(Label_default), { for: `qb-opt-label-${opt.id}` }, {
												default: withCtx(() => [..._cache[48] || (_cache[48] = [createTextVNode("Label", -1)])]),
												_: 1
											}, 8, ["for"]), createVNode(unref(Input_default), {
												id: `qb-opt-label-${opt.id}`,
												"model-value": opt.label,
												"data-testid": `quiz-builder-inspector-option-${opt.id}-label`,
												onInput: (e) => patchOption(opt.id, { label: e.target.value })
											}, null, 8, [
												"id",
												"model-value",
												"data-testid",
												"onInput"
											])]), createElementVNode("div", _hoisted_69, [createVNode(unref(Label_default), { for: `qb-opt-value-${opt.id}` }, {
												default: withCtx(() => [..._cache[49] || (_cache[49] = [createTextVNode("Value", -1)])]),
												_: 1
											}, 8, ["for"]), createVNode(unref(Input_default), {
												id: `qb-opt-value-${opt.id}`,
												"model-value": String(opt.value),
												"data-testid": `quiz-builder-inspector-option-${opt.id}-value`,
												onInput: (e) => patchOption(opt.id, { value: e.target.value })
											}, null, 8, [
												"id",
												"model-value",
												"data-testid",
												"onInput"
											])])]),
											createElementVNode("div", _hoisted_70, [createElementVNode("div", _hoisted_71, [createVNode(unref(Label_default), { for: `qb-opt-correct-${opt.id}` }, {
												default: withCtx(() => [..._cache[50] || (_cache[50] = [createTextVNode("Correct", -1)])]),
												_: 1
											}, 8, ["for"]), createVNode(unref(Switch_default), {
												id: `qb-opt-correct-${opt.id}`,
												"model-value": Boolean(opt.correct),
												"data-testid": `quiz-builder-inspector-option-${opt.id}-correct`,
												"onUpdate:modelValue": (v) => patchOption(opt.id, { correct: v })
											}, null, 8, [
												"id",
												"model-value",
												"data-testid",
												"onUpdate:modelValue"
											])]), createElementVNode("div", _hoisted_72, [createVNode(unref(Label_default), { for: `qb-opt-score-${opt.id}` }, {
												default: withCtx(() => [..._cache[51] || (_cache[51] = [createTextVNode("Score", -1)])]),
												_: 1
											}, 8, ["for"]), createVNode(unref(Input_default), {
												id: `qb-opt-score-${opt.id}`,
												type: "number",
												"model-value": opt.score ?? 0,
												"data-testid": `quiz-builder-inspector-option-${opt.id}-score`,
												onInput: (e) => patchOption(opt.id, { score: parseScore(e.target.value) })
											}, null, 8, [
												"id",
												"model-value",
												"data-testid",
												"onInput"
											])])]),
											createVNode(unref(Button_default), {
												variant: "ghost",
												size: "sm",
												class: "self-end text-destructive",
												"data-testid": `quiz-builder-inspector-option-${opt.id}-remove`,
												onClick: ($event) => onRemoveOption(opt.id)
											}, {
												default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" }), _cache[52] || (_cache[52] = createTextVNode(" Remove option ", -1))]),
												_: 1
											}, 8, ["data-testid", "onClick"])
										], 8, _hoisted_66);
									}), 128)), selectedQuestion.value.options.length === 0 ? (openBlock(), createElementBlock("p", _hoisted_73, " No options yet — click \"Add option\". ")) : createCommentVNode("", true)]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "multiple-choice" ? (openBlock(), createElementBlock("div", _hoisted_74, [createVNode(unref(Label_default), { for: "qb-partial" }, {
								default: withCtx(() => [..._cache[53] || (_cache[53] = [createTextVNode("Allow partial credit", -1)])]),
								_: 1
							}), createVNode(unref(Switch_default), {
								id: "qb-partial",
								"model-value": Boolean(selectedQuestion.value.allowPartialCredit),
								"onUpdate:modelValue": _cache[12] || (_cache[12] = (v) => patchSelectedQuestion({ allowPartialCredit: v }))
							}, null, 8, ["model-value"])])) : createCommentVNode("", true),
							selectedQuestion.value.type === "true-false" ? (openBlock(), createBlock(unref(Card_default), {
								key: 2,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-true-false"
							}, {
								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[54] || (_cache[54] = [createTextVNode(" correct answer ", -1)])]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex items-center justify-between gap-2 pb-3" }, {
									default: withCtx(() => [createVNode(unref(Label_default), { for: "qb-tf" }, {
										default: withCtx(() => [createTextVNode(toDisplayString(selectedQuestion.value.correctAnswer ? "True" : "False"), 1)]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-tf",
										"model-value": Boolean(selectedQuestion.value.correctAnswer),
										"data-testid": "quiz-builder-inspector-true-false-toggle",
										"onUpdate:modelValue": _cache[13] || (_cache[13] = (v) => patchSelectedQuestion({ correctAnswer: v }))
									}, null, 8, ["model-value"])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "text-match" ? (openBlock(), createBlock(unref(Card_default), {
								key: 3,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-text-match"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[56] || (_cache[56] = createElementVNode("span", null, "accepted answers", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-correct-answer",
											onClick: addCorrectAnswer
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[55] || (_cache[55] = createTextVNode(" Add ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.correctAnswers ?? [], (ans, i) => {
										return openBlock(), createElementBlock("div", {
											key: i,
											class: "flex items-center gap-1"
										}, [createVNode(unref(Input_default), {
											"model-value": ans,
											"data-testid": `quiz-builder-inspector-correct-answer-${i}`,
											onInput: (e) => setCorrectAnswerAt(i, e.target.value)
										}, null, 8, [
											"model-value",
											"data-testid",
											"onInput"
										]), createVNode(unref(Button_default), {
											variant: "ghost",
											size: "icon-sm",
											class: "text-destructive",
											"aria-label": "Remove",
											onClick: ($event) => removeCorrectAnswer(i)
										}, {
											default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
											_: 1
										}, 8, ["onClick"])]);
									}), 128)), createElementVNode("div", _hoisted_75, [createElementVNode("div", _hoisted_76, [createVNode(unref(Label_default), { for: "qb-case" }, {
										default: withCtx(() => [..._cache[57] || (_cache[57] = [createTextVNode("Case sensitive", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-case",
										"model-value": Boolean(selectedQuestion.value.caseSensitive),
										"onUpdate:modelValue": _cache[14] || (_cache[14] = (v) => patchSelectedQuestion({ caseSensitive: v }))
									}, null, 8, ["model-value"])]), createElementVNode("div", _hoisted_77, [createVNode(unref(Label_default), { for: "qb-trim" }, {
										default: withCtx(() => [..._cache[58] || (_cache[58] = [createTextVNode("Trim whitespace", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-trim",
										"model-value": selectedQuestion.value.trimWhitespace !== false,
										"onUpdate:modelValue": _cache[15] || (_cache[15] = (v) => patchSelectedQuestion({ trimWhitespace: v }))
									}, null, 8, ["model-value"])])])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "numeric-range" ? (openBlock(), createBlock(unref(Card_default), {
								key: 4,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-numeric-range"
							}, {
								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[59] || (_cache[59] = [createTextVNode(" correct answer ", -1)])]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "grid grid-cols-2 gap-2 pb-3" }, {
									default: withCtx(() => [
										createElementVNode("div", _hoisted_78, [createVNode(unref(Label_default), { for: "qb-num-correct" }, {
											default: withCtx(() => [..._cache[60] || (_cache[60] = [createTextVNode("Correct answer", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-num-correct",
											type: "number",
											"model-value": typeof selectedQuestion.value.correctAnswer === "number" ? selectedQuestion.value.correctAnswer : 0,
											"data-testid": "quiz-builder-inspector-numeric-correct",
											onInput: _cache[16] || (_cache[16] = (e) => patchSelectedQuestion({ correctAnswer: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])]),
										createElementVNode("div", _hoisted_79, [createVNode(unref(Label_default), { for: "qb-num-tol" }, {
											default: withCtx(() => [..._cache[61] || (_cache[61] = [createTextVNode("Tolerance (±)", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-num-tol",
											type: "number",
											"model-value": selectedQuestion.value.tolerance ?? 0,
											onInput: _cache[17] || (_cache[17] = (e) => patchSelectedQuestion({ tolerance: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])]),
										createElementVNode("div", _hoisted_80, [createVNode(unref(Label_default), { for: "qb-num-min" }, {
											default: withCtx(() => [..._cache[62] || (_cache[62] = [createTextVNode("Range min", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-num-min",
											type: "number",
											"model-value": selectedQuestion.value.numericRangeMin ?? "",
											onInput: _cache[18] || (_cache[18] = (e) => patchSelectedQuestion({ numericRangeMin: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])]),
										createElementVNode("div", _hoisted_81, [createVNode(unref(Label_default), { for: "qb-num-max" }, {
											default: withCtx(() => [..._cache[63] || (_cache[63] = [createTextVNode("Range max", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-num-max",
											type: "number",
											"model-value": selectedQuestion.value.numericRangeMax ?? "",
											onInput: _cache[19] || (_cache[19] = (e) => patchSelectedQuestion({ numericRangeMax: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])])
									]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "essay" ? (openBlock(), createBlock(unref(Card_default), {
								key: 5,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-essay"
							}, {
								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[64] || (_cache[64] = [createTextVNode(" essay ", -1)])]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [createElementVNode("div", _hoisted_82, [createElementVNode("div", _hoisted_83, [createVNode(unref(Label_default), { for: "qb-min-words" }, {
										default: withCtx(() => [..._cache[65] || (_cache[65] = [createTextVNode("Min words", -1)])]),
										_: 1
									}), createVNode(unref(Input_default), {
										id: "qb-min-words",
										type: "number",
										"model-value": selectedQuestion.value.minWords ?? "",
										onInput: _cache[20] || (_cache[20] = (e) => patchSelectedQuestion({ minWords: parseNumber(e.target.value) }))
									}, null, 8, ["model-value"])]), createElementVNode("div", _hoisted_84, [createVNode(unref(Label_default), { for: "qb-max-words" }, {
										default: withCtx(() => [..._cache[66] || (_cache[66] = [createTextVNode("Max words", -1)])]),
										_: 1
									}), createVNode(unref(Input_default), {
										id: "qb-max-words",
										type: "number",
										"model-value": selectedQuestion.value.maxWords ?? "",
										onInput: _cache[21] || (_cache[21] = (e) => patchSelectedQuestion({ maxWords: parseNumber(e.target.value) }))
									}, null, 8, ["model-value"])])]), createElementVNode("div", _hoisted_85, [createVNode(unref(Label_default), { for: "qb-rubric" }, {
										default: withCtx(() => [..._cache[67] || (_cache[67] = [createTextVNode("Grading rubric", -1)])]),
										_: 1
									}), createVNode(unref(Textarea_default), {
										id: "qb-rubric",
										"model-value": selectedQuestion.value.gradingRubric ?? "",
										onInput: _cache[22] || (_cache[22] = (e) => patchSelectedQuestion({ gradingRubric: e.target.value }))
									}, null, 8, ["model-value"])])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "matching" ? (openBlock(), createBlock(unref(Card_default), {
								key: 6,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-matching"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[69] || (_cache[69] = createElementVNode("span", null, "pairs", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-pair",
											onClick: addMatchPair
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[68] || (_cache[68] = createTextVNode(" Add pair ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.matchPairs ?? [], (pair, i) => {
										return openBlock(), createElementBlock("div", {
											key: i,
											class: "grid grid-cols-[1fr_auto_1fr_auto] items-center gap-1",
											"data-testid": `quiz-builder-inspector-pair-${i}`
										}, [
											createVNode(unref(Input_default), {
												"model-value": pair.left,
												placeholder: "Left",
												onInput: (e) => setMatchPairField(i, "left", e.target.value)
											}, null, 8, ["model-value", "onInput"]),
											createVNode(unref(Link2), { class: "h-3 w-3 text-muted-foreground" }),
											createVNode(unref(Input_default), {
												"model-value": pair.right,
												placeholder: "Right",
												onInput: (e) => setMatchPairField(i, "right", e.target.value)
											}, null, 8, ["model-value", "onInput"]),
											createVNode(unref(Button_default), {
												variant: "ghost",
												size: "icon-sm",
												class: "text-destructive",
												"aria-label": "Remove pair",
												onClick: ($event) => removeMatchPair(i)
											}, {
												default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
												_: 1
											}, 8, ["onClick"])
										], 8, _hoisted_86);
									}), 128)), createElementVNode("div", _hoisted_87, [createVNode(unref(Label_default), { for: "qb-shuffle" }, {
										default: withCtx(() => [..._cache[70] || (_cache[70] = [createTextVNode("Shuffle right side", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-shuffle",
										"model-value": selectedQuestion.value.shuffleMatches !== false,
										"onUpdate:modelValue": _cache[23] || (_cache[23] = (v) => patchSelectedQuestion({ shuffleMatches: v }))
									}, null, 8, ["model-value"])])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "ordering" ? (openBlock(), createBlock(unref(Card_default), {
								key: 7,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-ordering"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[72] || (_cache[72] = createElementVNode("span", null, "correct order", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-order-item",
											onClick: addOrderItem
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[71] || (_cache[71] = createTextVNode(" Add ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.correctOrder ?? [], (item, i) => {
										return openBlock(), createElementBlock("div", {
											key: i,
											class: "flex items-center gap-1"
										}, [
											createElementVNode("span", _hoisted_88, toDisplayString(i + 1) + ". ", 1),
											createVNode(unref(Input_default), {
												"model-value": item,
												onInput: (e) => setOrderItemAt(i, e.target.value)
											}, null, 8, ["model-value", "onInput"]),
											createVNode(unref(Button_default), {
												variant: "ghost",
												size: "icon-sm",
												class: "text-destructive",
												"aria-label": "Remove",
												onClick: ($event) => removeOrderItem(i)
											}, {
												default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
												_: 1
											}, 8, ["onClick"])
										]);
									}), 128)), createElementVNode("div", _hoisted_89, [createVNode(unref(Label_default), { for: "qb-ord-partial" }, {
										default: withCtx(() => [..._cache[73] || (_cache[73] = [createTextVNode("Allow partial credit", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-ord-partial",
										"model-value": Boolean(selectedQuestion.value.partialCreditEnabled),
										"onUpdate:modelValue": _cache[24] || (_cache[24] = (v) => patchSelectedQuestion({ partialCreditEnabled: v }))
									}, null, 8, ["model-value"])])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "fill-blank" ? (openBlock(), createBlock(unref(Card_default), {
								key: 8,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-fill-blank"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[75] || (_cache[75] = createElementVNode("span", null, "blanks", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-blank",
											onClick: addBlank
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[74] || (_cache[74] = createTextVNode(" Add blank ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.blanks ?? [], (blank, bIdx) => {
										return openBlock(), createElementBlock("div", {
											key: blank.id,
											class: "flex flex-col gap-1 rounded border bg-background p-2",
											"data-testid": `quiz-builder-inspector-blank-${bIdx}`
										}, [
											createElementVNode("div", _hoisted_91, [createElementVNode("span", _hoisted_92, " Blank " + toDisplayString(bIdx + 1), 1), createVNode(unref(Button_default), {
												variant: "ghost",
												size: "icon-sm",
												class: "text-destructive",
												"aria-label": "Remove blank",
												onClick: ($event) => removeBlank(bIdx)
											}, {
												default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
												_: 1
											}, 8, ["onClick"])]),
											(openBlock(true), createElementBlock(Fragment, null, renderList(blank.answers, (ans, aIdx) => {
												return openBlock(), createElementBlock("div", {
													key: aIdx,
													class: "flex items-center gap-1"
												}, [createVNode(unref(Input_default), {
													"model-value": ans,
													placeholder: "Accepted answer",
													onInput: (e) => setBlankAnswerAt(bIdx, aIdx, e.target.value)
												}, null, 8, ["model-value", "onInput"]), createVNode(unref(Button_default), {
													variant: "ghost",
													size: "icon-sm",
													class: "text-destructive",
													"aria-label": "Remove answer",
													onClick: ($event) => removeBlankAnswer(bIdx, aIdx)
												}, {
													default: withCtx(() => [createVNode(unref(X), { class: "h-3.5 w-3.5" })]),
													_: 1
												}, 8, ["onClick"])]);
											}), 128)),
											createVNode(unref(Button_default), {
												variant: "ghost",
												size: "sm",
												class: "self-start text-xs text-muted-foreground",
												onClick: ($event) => addBlankAnswer(bIdx)
											}, {
												default: withCtx(() => [createVNode(unref(Plus), { class: "h-3 w-3" }), _cache[76] || (_cache[76] = createTextVNode(" Add answer ", -1))]),
												_: 1
											}, 8, ["onClick"])
										], 8, _hoisted_90);
									}), 128)), createElementVNode("div", _hoisted_93, [createElementVNode("div", _hoisted_94, [createVNode(unref(Label_default), { for: "qb-blank-case" }, {
										default: withCtx(() => [..._cache[77] || (_cache[77] = [createTextVNode("Case sensitive", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-blank-case",
										"model-value": Boolean(selectedQuestion.value.caseSensitive),
										"onUpdate:modelValue": _cache[25] || (_cache[25] = (v) => patchSelectedQuestion({ caseSensitive: v }))
									}, null, 8, ["model-value"])]), createElementVNode("div", _hoisted_95, [createVNode(unref(Label_default), { for: "qb-blank-partial" }, {
										default: withCtx(() => [..._cache[78] || (_cache[78] = [createTextVNode("Per-blank credit", -1)])]),
										_: 1
									}), createVNode(unref(Switch_default), {
										id: "qb-blank-partial",
										"model-value": Boolean(selectedQuestion.value.partialCreditEnabled),
										"onUpdate:modelValue": _cache[26] || (_cache[26] = (v) => patchSelectedQuestion({ partialCreditEnabled: v }))
									}, null, 8, ["model-value"])])])]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "matching-categories" ? (openBlock(), createBlock(unref(Card_default), {
								key: 9,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-matching-categories"
							}, {
								default: withCtx(() => [createVNode(unref(CardHeader_default), { class: "py-2" }, {
									default: withCtx(() => [createVNode(unref(CardTitle_default), { class: "flex items-center justify-between font-mono text-xs uppercase tracking-wide" }, {
										default: withCtx(() => [_cache[80] || (_cache[80] = createElementVNode("span", null, "categories", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-category",
											onClick: addCategory
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[79] || (_cache[79] = createTextVNode(" Add category ", -1))]),
											_: 1
										})]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [createElementVNode("div", _hoisted_96, [createVNode(unref(Label_default), { for: "qb-items-per-cat" }, {
										default: withCtx(() => [..._cache[81] || (_cache[81] = [createTextVNode("Items per category", -1)])]),
										_: 1
									}), createVNode(unref(Input_default), {
										id: "qb-items-per-cat",
										type: "number",
										"model-value": selectedQuestion.value.itemsPerCategory ?? 4,
										onInput: _cache[27] || (_cache[27] = (e) => patchSelectedQuestion({ itemsPerCategory: parseNumber(e.target.value) }))
									}, null, 8, ["model-value"])]), (openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.categories ?? [], (cat, cIdx) => {
										return openBlock(), createElementBlock("div", {
											key: cat.slug,
											class: "flex flex-col gap-1 rounded border bg-background p-2",
											"data-testid": `quiz-builder-inspector-category-${cIdx}`
										}, [createElementVNode("div", _hoisted_98, [createVNode(unref(Input_default), {
											"model-value": cat.label,
											placeholder: "Category label",
											onInput: (e) => setCategoryField(cIdx, "label", e.target.value)
										}, null, 8, ["model-value", "onInput"]), createVNode(unref(Button_default), {
											variant: "ghost",
											size: "icon-sm",
											class: "text-destructive",
											"aria-label": "Remove category",
											onClick: ($event) => removeCategory(cIdx)
										}, {
											default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
											_: 1
										}, 8, ["onClick"])]), (openBlock(true), createElementBlock(Fragment, null, renderList(cat.items, (item, iIdx) => {
											return openBlock(), createBlock(unref(Input_default), {
												key: iIdx,
												"model-value": item,
												placeholder: "Item",
												onInput: (e) => setCategoryItemAt(cIdx, iIdx, e.target.value)
											}, null, 8, ["model-value", "onInput"]);
										}), 128))], 8, _hoisted_97);
									}), 128))]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true),
							selectedQuestion.value.type === "ai-analysis" ? (openBlock(), createBlock(unref(Card_default), {
								key: 10,
								class: "border-dashed",
								"data-testid": "quiz-builder-inspector-ai-analysis"
							}, {
								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[82] || (_cache[82] = [createTextVNode(" ai analysis ", -1)])]),
										_: 1
									})]),
									_: 1
								}), createVNode(unref(CardContent_default), { class: "flex flex-col gap-2 pb-3" }, {
									default: withCtx(() => [
										createElementVNode("div", _hoisted_99, [createVNode(unref(Label_default), { for: "qb-ai-method" }, {
											default: withCtx(() => [..._cache[83] || (_cache[83] = [createTextVNode("Scoring method", -1)])]),
											_: 1
										}), createVNode(unref(Select_default), {
											"model-value": selectedQuestion.value.scoringMethod ?? "standard",
											"onUpdate:modelValue": _cache[28] || (_cache[28] = (v) => patchSelectedQuestion({ scoringMethod: v }))
										}, {
											default: withCtx(() => [createVNode(unref(SelectTrigger_default), {
												id: "qb-ai-method",
												"data-testid": "quiz-builder-inspector-ai-method"
											}, {
												default: withCtx(() => [createVNode(unref(SelectValue_default))]),
												_: 1
											}), createVNode(unref(SelectContent_default), null, {
												default: withCtx(() => [
													createVNode(unref(SelectItem_default), { value: "standard" }, {
														default: withCtx(() => [..._cache[84] || (_cache[84] = [createTextVNode("Standard", -1)])]),
														_: 1
													}),
													createVNode(unref(SelectItem_default), { value: "item_count" }, {
														default: withCtx(() => [..._cache[85] || (_cache[85] = [createTextVNode("Item count", -1)])]),
														_: 1
													}),
													createVNode(unref(SelectItem_default), { value: "ai_judgment" }, {
														default: withCtx(() => [..._cache[86] || (_cache[86] = [createTextVNode("AI judgment", -1)])]),
														_: 1
													})
												]),
												_: 1
											})]),
											_: 1
										}, 8, ["model-value"])]),
										createElementVNode("div", _hoisted_100, [createVNode(unref(Label_default), { for: "qb-ai-prompt" }, {
											default: withCtx(() => [..._cache[87] || (_cache[87] = [createTextVNode("AI prompt", -1)])]),
											_: 1
										}), createVNode(unref(Textarea_default), {
											id: "qb-ai-prompt",
											"model-value": selectedQuestion.value.aiPrompt ?? "",
											"data-testid": "quiz-builder-inspector-ai-prompt",
											onInput: _cache[29] || (_cache[29] = (e) => patchSelectedQuestion({ aiPrompt: e.target.value }))
										}, null, 8, ["model-value"])]),
										createElementVNode("div", _hoisted_101, [createElementVNode("div", _hoisted_102, [createVNode(unref(Label_default), { for: "qb-ai-max" }, {
											default: withCtx(() => [..._cache[88] || (_cache[88] = [createTextVNode("Max points", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-ai-max",
											type: "number",
											"model-value": selectedQuestion.value.maxPoints ?? 100,
											onInput: _cache[30] || (_cache[30] = (e) => patchSelectedQuestion({ maxPoints: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])]), selectedQuestion.value.scoringMethod === "item_count" ? (openBlock(), createElementBlock("div", _hoisted_103, [createVNode(unref(Label_default), { for: "qb-ai-per" }, {
											default: withCtx(() => [..._cache[89] || (_cache[89] = [createTextVNode("Points per item", -1)])]),
											_: 1
										}), createVNode(unref(Input_default), {
											id: "qb-ai-per",
											type: "number",
											"model-value": selectedQuestion.value.pointsPerItem ?? 50,
											onInput: _cache[31] || (_cache[31] = (e) => patchSelectedQuestion({ pointsPerItem: parseNumber(e.target.value) }))
										}, null, 8, ["model-value"])])) : createCommentVNode("", true)]),
										selectedQuestion.value.scoringMethod !== "ai_judgment" ? (openBlock(), createElementBlock("div", _hoisted_104, [createElementVNode("div", _hoisted_105, [_cache[91] || (_cache[91] = createElementVNode("span", { class: "font-mono text-[10px] uppercase tracking-wide text-muted-foreground" }, " Identifying items ", -1)), createVNode(unref(Button_default), {
											variant: "outline",
											size: "sm",
											"data-testid": "quiz-builder-inspector-add-criterion",
											onClick: addCriterion
										}, {
											default: withCtx(() => [createVNode(unref(Plus), { class: "h-3.5 w-3.5" }), _cache[90] || (_cache[90] = createTextVNode(" Add ", -1))]),
											_: 1
										})]), (openBlock(true), createElementBlock(Fragment, null, renderList(selectedQuestion.value.aiCriteria ?? [], (crit, cIdx) => {
											return openBlock(), createElementBlock("div", {
												key: crit.key,
												class: "flex flex-col gap-1 rounded border bg-background p-2",
												"data-testid": `quiz-builder-inspector-criterion-${cIdx}`
											}, [createElementVNode("div", _hoisted_107, [
												createVNode(unref(Input_default), {
													"model-value": crit.name,
													placeholder: "Name",
													onInput: (e) => setCriterionField(cIdx, "name", e.target.value)
												}, null, 8, ["model-value", "onInput"]),
												createVNode(unref(Input_default), {
													type: "number",
													"model-value": crit.points,
													placeholder: "Points",
													onInput: (e) => setCriterionField(cIdx, "points", parseNumber(e.target.value))
												}, null, 8, ["model-value", "onInput"]),
												createVNode(unref(Button_default), {
													variant: "ghost",
													size: "icon-sm",
													class: "text-destructive",
													"aria-label": "Remove criterion",
													onClick: ($event) => removeCriterion(cIdx)
												}, {
													default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" })]),
													_: 1
												}, 8, ["onClick"])
											]), createVNode(unref(Textarea_default), {
												"model-value": crit.description,
												placeholder: "Description",
												onInput: (e) => setCriterionField(cIdx, "description", e.target.value)
											}, null, 8, ["model-value", "onInput"])], 8, _hoisted_106);
										}), 128))])) : createCommentVNode("", true)
									]),
									_: 1
								})]),
								_: 1
							})) : createCommentVNode("", true)
						], 512), [[vShow, inspectorTab.value === "options"]]),
						withDirectives(createElementVNode("div", _hoisted_108, [createElementVNode("div", _hoisted_109, [createVNode(unref(Label_default), { for: "qb-feedback-correct" }, {
							default: withCtx(() => [..._cache[92] || (_cache[92] = [createTextVNode("Feedback — correct", -1)])]),
							_: 1
						}), createVNode(unref(Textarea_default), {
							id: "qb-feedback-correct",
							"model-value": selectedQuestion.value.feedback?.correct ?? "",
							"data-testid": "quiz-builder-inspector-feedback-correct",
							placeholder: "Shown when the answer is correct",
							onInput: _cache[32] || (_cache[32] = (e) => patchFeedback({ correct: e.target.value }))
						}, null, 8, ["model-value"])]), createElementVNode("div", _hoisted_110, [createVNode(unref(Label_default), { for: "qb-feedback-incorrect" }, {
							default: withCtx(() => [..._cache[93] || (_cache[93] = [createTextVNode("Feedback — incorrect", -1)])]),
							_: 1
						}), createVNode(unref(Textarea_default), {
							id: "qb-feedback-incorrect",
							"model-value": selectedQuestion.value.feedback?.incorrect ?? "",
							"data-testid": "quiz-builder-inspector-feedback-incorrect",
							placeholder: "Shown when the answer is incorrect",
							onInput: _cache[33] || (_cache[33] = (e) => patchFeedback({ incorrect: e.target.value }))
						}, null, 8, ["model-value"])])], 512), [[vShow, inspectorTab.value === "grading"]]),
						createVNode(unref(Button_default), {
							variant: "destructive",
							size: "sm",
							class: "self-end",
							"data-testid": "quiz-builder-remove",
							onClick: onRemoveQuestion
						}, {
							default: withCtx(() => [createVNode(unref(Trash2), { class: "h-3.5 w-3.5" }), _cache[94] || (_cache[94] = createTextVNode(" Remove question ", -1))]),
							_: 1
						})
					], 8, _hoisted_59)
				]))
			], 14, _hoisted_1);
		};
	}
});
//#endregion
//#region src/components/compositions/elements/builder/QuizBuilder.vue
var QuizBuilder_exports = /* @__PURE__ */ __exportAll({ default: () => QuizBuilder_default });
var QuizBuilder_default = QuizBuilder_vue_vue_type_script_setup_true_lang_default;
//#endregion
export { QuizBuilder_exports as n, QuizBuilder_default as t };

//# sourceMappingURL=QuizBuilder-2KBcDGAM.js.map