UNPKG

@scalar/api-client

Version:

the open source API testing client

54 lines (53 loc) 1.85 kB
import { defineComponent as i, computed as r, createBlock as l, createCommentVNode as m, 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 f from "../../environments/EnvironmentsList.vue.js"; const y = { name: "Environment" }, w = /* @__PURE__ */ i({ ...y, props: { documentSlug: {}, document: {}, eventBus: {}, layout: {}, path: {}, method: {}, exampleName: {}, environment: {}, securitySchemes: {}, workspaceStore: {}, activeWorkspace: {}, plugins: {}, customThemes: {}, currentTheme: {}, isDarkMode: { type: Boolean }, collectionType: {} }, setup(e) { const c = r( () => (e.collectionType === "document" ? e.document["x-scalar-environments"] : e.workspaceStore.workspace["x-scalar-environments"]) ?? {} ), a = r(() => e.workspaceStore.workspace["x-scalar-active-environment"]); return (k, t) => e.collectionType !== "operation" ? (s(), l(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(f), { activeEnvironment: a.value, collectionType: e.collectionType, environments: c.value, eventBus: e.eventBus }, null, 8, ["activeEnvironment", "collectionType", "environments", "eventBus"]) ]), _: 1 })) : m("", !0); } }); export { w as default };