import { defineComponent as i, computed as c, createBlock as m, createCommentVNode as l, openBlock as s, withCtx as n, createVNode as u, unref as v, createTextVNode as o, createElementVNode as d } from "vue";
import p from "../../settings/components/Section.vue.js";
import y from "../../environments/EnvironmentsList.vue.js";
const f = {
  name: "Environment"
}, h = /* @__PURE__ */ i({
  ...f,
  props: {
    documentSlug: {},
    document: {},
    eventBus: {},
    layout: {},
    path: {},
    method: {},
    exampleName: {},
    environment: {},
    securitySchemes: {},
    workspaceStore: {},
    activeWorkspace: {},
    plugins: {},
    customThemes: {},
    currentTheme: {},
    isDarkMode: { type: Boolean },
    fetchRegistryDocument: { type: Function },
    collectionType: {}
  },
  setup(e) {
    const r = c(
      () => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {}
    ), a = c(() => e.workspaceStore.workspace["x-scalar-active-environment"]);
    return (k, t) => e.collectionType !== "operation" ? (s(), m(p, { key: 0 }, {
      title: n(() => [...t[0] || (t[0] = [
        o("Environment Variables", -1)
      ])]),
      description: n(() => [...t[1] || (t[1] = [
        o(" Set environment variables at your collection level. Use ", -1),
        d("code", { class: "font-code text-c-2" }, " {{ variable }} ", -1),
        o(" to add / search among the selected environment's variables in your request inputs. ", -1)
      ])]),
      default: n(() => [
        u(v(y), {
          activeEnvironment: a.value,
          collectionType: e.collectionType,
          environments: r.value,
          eventBus: e.eventBus
        }, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"])
      ]),
      _: 1
    })) : l("", !0);
  }
});
export {
  h as default
};
