import{REDOCLY_TEAMS_RBAC as n}from"@redocly/config";import{joinWithSeparator as h}from"../services/index.js";import{getValueFromMdParsedExtension as r,safeSlugify as m}from"../utils/index.js";import{getHref as S}from"../services/menu/operation.js";import{saveTextBeforeHeading as v}from"../utils/saveTextBeforeHeading.js";function k(i,e,s){let o;s?.id&&(i==="schema"||i==="tool"||i==="rsrc"||i==="prompt")?o=h(s.id,m(e.name)):o=e.id||m(e.name);const d=e["x-displayName"]||e.name,c=e.level||1,t=e.isSchema,f=e.ast||void 0,l=v(r(e,"description")||""),a=e.items||[],x=e.externalDocs;return{id:o.toLowerCase(),type:i,parent:s,name:d,level:c,depth:0,isSchema:t,description:l,items:a,ast:f,externalDocs:x,href:S({id:o}),[n]:e[n]||s?.[n],keywords:i==="tag"?e["x-keywords"]:void 0}}export{k as getTagOrGroup};
