"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.ResponseDetails=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),ResponseHeaders_1=require("./ResponseHeaders"),styled_1=require("./styled"),BodyContent_1=require("../common/BodyContent"),services_1=require("../../services"),ExpandAllButton_1=require("../ExpandAllButton");function ResponseDetailsComponent({response:e,operationId:s,operationPointer:n,callbackId:r,disableDeepLinks:t}){const{description:o,headers:i,content:d,summary:a,code:p}=e;return(0,ExpandAllButton_1.useUpdateExpandedFields)("response",i,d,n),(0,jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment,{children:[(0,jsx_runtime_1.jsx)(styled_1.StyledDescription,{className:"redoc-markdown",source:a}),(0,jsx_runtime_1.jsx)(styled_1.StyledDescription,{className:"redoc-markdown",source:o}),(0,jsx_runtime_1.jsx)(ResponseHeaders_1.ResponseHeaders,{headers:i,deepLink:t?void 0:generateDeepLink(s,r,p,"headers")}),(0,jsx_runtime_1.jsx)(BodyContent_1.BodyContent,{content:d,skipWriteOnly:!0,deepLink:t?void 0:generateDeepLink(s,r,p,"body")})]})}function generateDeepLink(e,s="",n,r){const t=s?`${s}/response&c=${n}/${r}`:`response&c=${n}/${r}`;return(0,services_1.makeDeepLink)(e,t)}exports.ResponseDetails=(0,react_1.memo)(ResponseDetailsComponent);
//# sourceMappingURL=ResponseDetails.js.map