import{jsx as _jsx,Fragment as _Fragment,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{ResponseHeaders}from"./ResponseHeaders";import{StyledDescription}from"./styled";import{BodyContent}from"../common/BodyContent";import{makeDeepLink}from"../../services";import{useUpdateExpandedFields}from"../ExpandAllButton";function ResponseDetailsComponent({response:e,operationId:s,operationPointer:o,callbackId:n,disableDeepLinks:r}){const{description:t,headers:i,content:p,summary:a,code:d}=e;return useUpdateExpandedFields("response",i,p,o),_jsxs(_Fragment,{children:[_jsx(StyledDescription,{className:"redoc-markdown",source:a}),_jsx(StyledDescription,{className:"redoc-markdown",source:t}),_jsx(ResponseHeaders,{headers:i,deepLink:r?void 0:generateDeepLink(s,n,d,"headers")}),_jsx(BodyContent,{content:p,skipWriteOnly:!0,deepLink:r?void 0:generateDeepLink(s,n,d,"body")})]})}export const ResponseDetails=memo(ResponseDetailsComponent);function generateDeepLink(e,s="",o,n){return makeDeepLink(e,s?`${s}/response&c=${o}/${n}`:`response&c=${o}/${n}`)}
//# sourceMappingURL=ResponseDetails.js.map