import{encodeBackSlashes,getOperationId,getOperationName}from"../../utils";export function getOperationsItems(e,t,o){if(0===t.operations.length)return[];const r=[],a=[];for(const p of t.operations){const t=getOperationId(p,e),n={id:t,type:"operation",parent:e,operationDefinition:p,depth:o,name:getOperationName(p),httpVerb:p.httpVerb,path:p.pathName,items:[],isWebhook:p.isWebhook,operationId:p.operationId,badges:p["x-badges"]||[],href:getHref({id:t}),deprecated:!!p.deprecated};p.isWebhook?a.push(n):r.push(n)}return[...r.sort(((e,t)=>Number(e.deprecated)-Number(t.deprecated))),...a.sort(((e,t)=>Number(e.deprecated)-Number(t.deprecated)))]}export function getHref({id:e}){return encodeBackSlashes(`/${e}`.toLowerCase())}
//# sourceMappingURL=operation.js.map