"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getTagOrGroup=void 0;const services_1=require("../services"),utils_1=require("../utils"),operation_1=require("../services/menu/operation"),saveTextBeforeHeading_1=require("../utils/saveTextBeforeHeading");function getTagOrGroup(e,r,i){let t;t=(null==i?void 0:i.id)&&"schema"===e?(0,services_1.joinWithSeparator)(i.id,(0,utils_1.safeSlugify)(r.name)):r.id||(0,utils_1.safeSlugify)(r.name);const s=r["x-displayName"]||r.name,a=r.level||1,o=r.isSchema,n=r.ast||void 0,u=(0,saveTextBeforeHeading_1.saveTextBeforeHeading)((0,utils_1.getValueFromMdParsedExtension)(r,"description")||""),l=r.items||[],d=r.externalDocs;return{id:t.toLowerCase(),type:e,parent:i,name:s,level:a,depth:0,isSchema:o,description:u,items:l,ast:n,externalDocs:d,href:(0,operation_1.getHref)({id:t})}}exports.getTagOrGroup=getTagOrGroup;
//# sourceMappingURL=group.js.map