"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getActiveMediaType=exports.getMediaContent=void 0;const nexus_1=require("../jotai/nexus"),mediaType_1=require("./mediaType"),app_1=require("../jotai/app");function getMediaContent({parser:e,info:t,isRequestType:i,options:a,data:{operation:p,type:o,response:n,absolutePointer:s=""}}){const r=Object.keys(t).map((r=>(0,mediaType_1.getMediaType)(e,r,i,t[r],a,{operation:p,type:o,response:n,absolutePointer:s}))),d=r.filter((e=>!!e.examples||!!e.formExamples)).length>0;return{mediaTypes:r,isRequestType:i,hasSample:d,operation:p}}function getActiveMediaType(e,t){const i=t||(0,nexus_1.readAtom)(app_1.activeMimeNameAtom);return i&&e.mediaTypes.find((e=>e.name===i))||e.mediaTypes[0]}exports.getMediaContent=getMediaContent,exports.getActiveMediaType=getActiveMediaType;
//# sourceMappingURL=mediaContent.js.map