import { useActiveEntities } from "../../store/active-entities.js";
import { useWorkspace } from "../../store/store.js";
import ViewLayoutSection_default from "../../components/ViewLayout/ViewLayoutSection.vue.js";
import MarkdownInput_default from "./components/MarkdownInput.vue.js";
import { createBlock, createCommentVNode, defineComponent, openBlock, unref, withCtx } from "vue";
//#region src/views/Collection/CollectionOverview.vue?vue&type=script&setup=true&lang.ts
var CollectionOverview_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	__name: "CollectionOverview",
	setup(__props) {
		const { activeCollection, activeEnvironment, activeEnvVariables, activeWorkspace } = useActiveEntities();
		const { collectionMutators } = useWorkspace();
		/**
		* Update info.description
		*/
		const updateCollectionDescription = (value) => {
			if (!activeCollection.value) return;
			collectionMutators.edit(activeCollection.value.uid, "info.description", value);
		};
		return (_ctx, _cache) => {
			return openBlock(), createBlock(ViewLayoutSection_default, null, {
				default: withCtx(() => [unref(activeEnvironment) && unref(activeWorkspace) ? (openBlock(), createBlock(MarkdownInput_default, {
					key: 0,
					envVariables: unref(activeEnvVariables),
					environment: unref(activeEnvironment),
					modelValue: unref(activeCollection)?.info?.description ?? "",
					workspace: unref(activeWorkspace),
					"onUpdate:modelValue": updateCollectionDescription
				}, null, 8, [
					"envVariables",
					"environment",
					"modelValue",
					"workspace"
				])) : createCommentVNode("", true)]),
				_: 1
			});
		};
	}
});
//#endregion
export { CollectionOverview_vue_vue_type_script_setup_true_lang_default as default };

//# sourceMappingURL=CollectionOverview.vue.script.js.map