"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getResponseType = void 0;
const tslib_1 = require("tslib");
const typeis = tslib_1.__importStar(require("type-is"));
function getResponseType(contentType) {
    for (const [mimeType, resolution] of responseMapEntries) {
        if (typeis.is(contentType, mimeType)) {
            return resolution;
        }
    }
    return '';
}
exports.getResponseType = getResponseType;
const responseMap = {
    'application/json': 'json',
    'application/*+json': 'json',
    'text/html': 'html',
    'text/xml': 'xml',
    'application/xml': 'xml',
    'application/*+xml': 'xml',
    'text/plain': 'text',
    'text/markdown': 'md',
    'image/*': 'img',
};
const responseMapEntries = Object.entries(responseMap);
//# sourceMappingURL=getResponseType.js.map