@scalar/api-reference
Version:
Generate beautiful API references from OpenAPI documents
83 lines (82 loc) • 3.27 kB
JavaScript
import { defineComponent, createBlock, openBlock, withCtx, createVNode, unref, renderSlot, createTextVNode } from "vue";
import _sfc_main$1 from "../../Lazy/Lazy.vue.js";
import SectionContainer from "../../Section/SectionContainer.vue.js";
import SectionContainerAccordion from "../../Section/SectionContainerAccordion.vue.js";
import SectionHeaderTag from "../../Section/SectionHeaderTag.vue.js";
import ShowMoreButton from "../../ShowMoreButton.vue.js";
import Section from "../../Section/Section.vue.js";
import SectionHeader from "../../Section/SectionHeader.vue.js";
const _sfc_main = /* @__PURE__ */ defineComponent({
__name: "ModelTag",
props: {
id: {},
isCollapsed: { type: Boolean },
eventBus: {},
layout: {}
},
setup(__props) {
return (_ctx, _cache) => {
return openBlock(), createBlock(_sfc_main$1, { id: "models" }, {
default: withCtx(() => [
__props.layout === "modern" ? (openBlock(), createBlock(SectionContainer, {
key: 0,
id: "model"
}, {
default: withCtx(() => [
createVNode(unref(Section), {
id: __props.id,
"aria-label": "Models",
onIntersecting: _cache[1] || (_cache[1] = () => __props.eventBus?.emit("intersecting:nav-item", { id: __props.id }))
}, {
default: withCtx(() => [
createVNode(unref(SectionHeader), null, {
default: withCtx(() => [
createVNode(SectionHeaderTag, { level: 2 }, {
default: withCtx(() => [..._cache[3] || (_cache[3] = [
createTextVNode(" Models ", -1)
])]),
_: 1
})
]),
_: 1
}),
!__props.isCollapsed ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createBlock(ShowMoreButton, {
key: 1,
id: __props.id,
class: "top-0",
onClick: _cache[0] || (_cache[0] = () => __props.eventBus.emit("toggle:nav-item", { id: __props.id, open: true }))
}, null, 8, ["id"]))
]),
_: 3
}, 8, ["id"])
]),
_: 3
})) : (openBlock(), createBlock(SectionContainerAccordion, {
key: 1,
"aria-label": "Models",
class: "pb-12",
modelValue: !__props.isCollapsed,
"onUpdate:modelValue": _cache[2] || (_cache[2] = () => __props.eventBus?.emit("toggle:nav-item", { id: __props.id, open: __props.isCollapsed }))
}, {
title: withCtx(() => [
createVNode(unref(SectionHeader), { level: 2 }, {
default: withCtx(() => [..._cache[4] || (_cache[4] = [
createTextVNode("Models", -1)
])]),
_: 1
})
]),
default: withCtx(() => [
renderSlot(_ctx.$slots, "default")
]),
_: 3
}, 8, ["modelValue"]))
]),
_: 3
});
};
}
});
export {
_sfc_main as default
};