import { FC } from 'react'; import { Box, Typography } from '@mui/material'; import { ApiDocumentationEndpointAction } from '../../core/documentation/types'; import { ApiDocumentationResponse } from './ApiDocumentationResponse'; type ApiDocumentationResponseBadgeProps = { action: ApiDocumentationEndpointAction; }; export const ApiDocumentationResponseBadge: FC = ({ action }) => ( <> Response {action.returnType && action.returnType !== 'void' && ( <> {' (based on '} {action.returnType} ) )} : {Object.values(action.responses).length > 0 ? ( Object.entries(action.responses).map(([responseKey, response]) => ( )) ) : ( This endpoint does not use strict data types for response. )} );