import Section_default from "../../settings/components/Section.vue.js";
import EnvironmentsList_default from "../../environments/EnvironmentsList.vue.js";
import { computed, createBlock, createCommentVNode, createElementVNode, createTextVNode, createVNode, defineComponent, openBlock, unref, withCtx } from "vue";
var Environment_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ defineComponent({
	name: "Environment",
	props: {
		documentSlug: {},
		document: {},
		eventBus: {},
		layout: {},
		path: {},
		method: {},
		exampleName: {},
		environment: {},
		securitySchemes: {},
		workspaceStore: {},
		activeWorkspace: {},
		plugins: {},
		customThemes: {},
		currentTheme: {},
		isDarkMode: { type: Boolean },
		fetchRegistryDocument: { type: Function },
		telemetry: { type: Boolean },
		onUpdateTelemetry: { type: Function },
		collectionType: {}
	},
	setup(__props) {
		/** Document or workspace environments */
		const environments = computed(() => (__props.collectionType === "document" ? __props.document["x-scalar-environments"] : __props.workspaceStore.workspace["x-scalar-environments"]) ?? {});
		const activeEnvironment = computed(() => {
			return __props.workspaceStore.workspace["x-scalar-active-environment"];
		});
		return (_ctx, _cache) => {
			return __props.collectionType !== "operation" ? (openBlock(), createBlock(Section_default, { key: 0 }, {
				title: withCtx(() => [..._cache[0] || (_cache[0] = [createTextVNode("Environment Variables", -1)])]),
				description: withCtx(() => [..._cache[1] || (_cache[1] = [
					createTextVNode(" Set environment variables at your collection level. Use ", -1),
					createElementVNode("code", { class: "font-code text-c-2" }, " {{ variable }} ", -1),
					createTextVNode(" to add / search among the selected environment's variables in your request inputs. ", -1)
				])]),
				default: withCtx(() => [createVNode(unref(EnvironmentsList_default), {
					activeEnvironment: activeEnvironment.value,
					collectionType: __props.collectionType,
					environments: environments.value,
					eventBus: __props.eventBus
				}, null, 8, [
					"activeEnvironment",
					"collectionType",
					"environments",
					"eventBus"
				])]),
				_: 1
			})) : createCommentVNode("", true);
		};
	}
});
//#endregion
export { Environment_vue_vue_type_script_setup_true_lang_default as default };

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