"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.PrettyViewer = void 0;
const tslib_1 = require("tslib");
const ui_kit_1 = require("@stoplight/ui-kit");
const React = tslib_1.__importStar(require("react"));
const usePrettifiedResponse_1 = require("../../../hooks/usePrettifiedResponse");
const REGISTERED_LANGUAGES = ['xml', 'html', 'json'];
exports.PrettyViewer = ({ type, response }) => {
    const value = usePrettifiedResponse_1.usePrettifiedResponse(response, type);
    return (React.createElement("div", { className: "RequestMaker__RawViewer" },
        React.createElement(ui_kit_1.CodeViewer, { language: REGISTERED_LANGUAGES.includes(type) ? type : 'text', value: value, showLineNumbers: true, className: "p-5" })));
};
//# sourceMappingURL=PrettyViewer.js.map