@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
53 lines (52 loc) • 1.72 kB
JavaScript
import { defineComponent as p, computed as m, createBlock as l, createCommentVNode as u, openBlock as a, unref as r, withCtx as t, createVNode as o, createTextVNode as i, toDisplayString as s, createElementVNode as f, createElementBlock as h, Fragment as g, renderList as k } from "vue";
import { ScalarCard as _, ScalarCardHeader as C, ScalarCardSection as S } from "@scalar/components";
import b from "../ScreenReader.vue.js";
import y from "./OperationsListItem.vue.js";
const N = ["aria-label"], E = /* @__PURE__ */ p({
__name: "OperationsList",
props: {
tag: {}
},
setup(d) {
const c = m(() => d.tag.children?.filter(
(e) => e.type === "operation" || e.type === "webhook"
) ?? []);
return (e, V) => e.tag.children && e.tag.children?.length > 0 ? (a(), l(r(_), {
key: 0,
class: "endpoints-card"
}, {
default: t(() => [
o(r(C), { muted: "" }, {
default: t(() => [
o(b, null, {
default: t(() => [
i(s(e.tag.title), 1)
]),
_: 1
}),
i(" " + s(e.tag.isWebhooks ? "Webhooks" : "Operations"), 1)
]),
_: 1
}),
o(r(S), { class: "custom-scroll max-h-[60vh]" }, {
default: t(() => [
f("ul", {
"aria-label": `${e.tag.title} endpoints`,
class: "endpoints"
}, [
(a(!0), h(g, null, k(c.value, (n) => (a(), l(y, {
key: n.id,
operation: n
}, null, 8, ["operation"]))), 128))
], 8, N)
]),
_: 1
})
]),
_: 1
})) : u("", !0);
}
});
export {
E as default
};