"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.HttpRequest = void 0;
const tslib_1 = require("tslib");
const react_error_boundary_1 = require("@stoplight/react-error-boundary");
const classnames_1 = tslib_1.__importDefault(require("classnames"));
const React = tslib_1.__importStar(require("react"));
const useRequestMaker_1 = require("../../../hooks/useRequestMaker");
const RequestMaker_1 = require("../../RequestMaker");
const HttpRequestComponent = React.memo(({ data, className }) => {
    const store = useRequestMaker_1.useRequestMaker(data, true);
    return (React.createElement("div", { className: classnames_1.default('RequestMaker', className) },
        React.createElement(useRequestMaker_1.RequestMakerProvider, { value: store },
            React.createElement(RequestMaker_1.RequestEndpoint, null),
            React.createElement(RequestMaker_1.RequestEditor, null),
            React.createElement(RequestMaker_1.ResponseViewer, null))));
});
exports.HttpRequest = react_error_boundary_1.withErrorBoundary(HttpRequestComponent, { recoverableProps: ['data'] });
//# sourceMappingURL=index.js.map