"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Request = void 0;
const tslib_1 = require("tslib");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const lodash_1 = require("lodash");
const React = tslib_1.__importStar(require("react"));
const HttpSecuritySchemes_1 = require("../HttpSecuritySchemes");
const Body_1 = require("./Body");
const Parameters_1 = require("./Parameters");
exports.Request = ({ request, security, className }) => {
    if (!request || typeof request !== 'object')
        return null;
    const { path, headers, query, cookie, body } = request;
    return (React.createElement("div", { className: classnames_1.default('HttpOperation__Request', className) },
        React.createElement(HttpSecuritySchemes_1.HttpSecuritySchemes, { className: "mb-10", title: "Authorization", securities: lodash_1.flatten(security) }),
        React.createElement(Parameters_1.Parameters, { className: "mb-10", title: "Path Parameters", parameterType: "path", parameters: path }),
        React.createElement(Parameters_1.Parameters, { className: "mb-10", title: "Query Parameters", parameterType: "query", parameters: query }),
        React.createElement(Parameters_1.Parameters, { className: "mb-10", title: "Cookie Parameters", parameterType: "cookie", parameters: cookie }),
        React.createElement(Parameters_1.Parameters, { className: "mb-10", title: "Header Parameters", parameterType: "header", parameters: headers }),
        body && React.createElement(Body_1.Body, { className: "mb-10", body: body })));
};
exports.Request.displayName = 'HttpOperation.Request';
//# sourceMappingURL=Request.js.map