import{readAtom}from"../jotai/nexus";import{getMediaType}from"./mediaType";import{activeMimeNameAtom}from"../jotai/app";export function getMediaContent({parser:e,info:t,isRequestType:o,options:a,data:{operation:i,type:p,response:r,absolutePointer:m=""}}){const n=Object.keys(t).map((n=>getMediaType(e,n,o,t[n],a,{operation:i,type:p,response:r,absolutePointer:m}))),s=n.filter((e=>!!e.examples||!!e.formExamples)).length>0;return{mediaTypes:n,isRequestType:o,hasSample:s,operation:i}}export function getActiveMediaType(e,t){const o=t||readAtom(activeMimeNameAtom);return o&&e.mediaTypes.find((e=>e.name===o))||e.mediaTypes[0]}
//# sourceMappingURL=mediaContent.js.map