import{jsx as _jsx,jsxs as _jsxs}from"react/jsx-runtime";import{memo}from"react";import{PanelHeader}from"@redocly/theme";import styled from"styled-components";import{PayloadSamples}from"../PayloadSamples";import{ServerListDropdown}from"../ServerListDropdown";import{CodeBlockPanel}from"../common";function CallbackSamplesComponent({callback:e}){var o;if(!(null==e?void 0:e.hasSamples))return null;return _jsx(CodeBlockPanel,{className:"panel-callback-samples",header:()=>_jsxs(StyledPanelHeader,{isExpandable:!1,children:[_jsx(StyledServerListDropdown,{operation:e}),_jsx(PayloadTitle,{children:"Payload"})]}),isExpandable:!1,children:(null===(o=null==e?void 0:e.payload)||void 0===o?void 0:o.requestBodyContent)&&_jsx(PayloadSamples,{content:e.payload.requestBodyContent})})}export const CallbackSamples=memo(CallbackSamplesComponent);const PayloadTitle=styled.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=styled(PanelHeader)`
  flex-wrap: nowrap;
`,StyledServerListDropdown=styled(ServerListDropdown)`
  padding-right: var(--spacing-base);
  min-width: 0;
`;
//# sourceMappingURL=CallbackSamples.js.map