"use strict";var __importDefault=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(exports,"__esModule",{value:!0}),exports.CallbackSamples=void 0;const jsx_runtime_1=require("react/jsx-runtime"),react_1=require("react"),theme_1=require("@redocly/theme"),styled_components_1=__importDefault(require("styled-components")),PayloadSamples_1=require("../PayloadSamples"),ServerListDropdown_1=require("../ServerListDropdown"),common_1=require("../common");function CallbackSamplesComponent({callback:e}){var r;if(!(null==e?void 0:e.hasSamples))return null;return(0,jsx_runtime_1.jsx)(common_1.CodeBlockPanel,{className:"panel-callback-samples",header:()=>(0,jsx_runtime_1.jsxs)(StyledPanelHeader,{isExpandable:!1,children:[(0,jsx_runtime_1.jsx)(StyledServerListDropdown,{operation:e}),(0,jsx_runtime_1.jsx)(PayloadTitle,{children:"Payload"})]}),isExpandable:!1,children:(null===(r=null==e?void 0:e.payload)||void 0===r?void 0:r.requestBodyContent)&&(0,jsx_runtime_1.jsx)(PayloadSamples_1.PayloadSamples,{content:e.payload.requestBodyContent})})}exports.CallbackSamples=(0,react_1.memo)(CallbackSamplesComponent);const PayloadTitle=styled_components_1.default.div`
  font-size: var(--font-size-sm);
  font-style: normal;
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-sm);
  padding: 0 var(--spacing-xs);
  border-radius: var(--border-radius);
  background: var(--dropdown-bg-color);
  color: var(--dropdown-text-color);
`,StyledPanelHeader=(0,styled_components_1.default)(theme_1.PanelHeader)`
  flex-wrap: nowrap;
`,StyledServerListDropdown=(0,styled_components_1.default)(ServerListDropdown_1.ServerListDropdown)`
  padding-right: var(--spacing-base);
  min-width: 0;
`;
//# sourceMappingURL=CallbackSamples.js.map