import React from 'react';
import { CollapserCard } from '@looker/run-it';
import { ExploreType } from '../../../components';
export var DocRequestBody = _ref => {
  var {
    method,
    api
  } = _ref;
  var bodies = method.bodyParams;
  if (bodies.length === 0) return React.createElement(React.Fragment, null);
  var header = bodies.length > 1 ? 'Request bodies' : 'Request body';
  return React.createElement(CollapserCard, {
    id: "bodies",
    heading: header
  }, React.createElement(React.Fragment, null, bodies.map(body => React.createElement(ExploreType, {
    api: api,
    type: body.type,
    open: false,
    key: "body.".concat(body.name)
  }))));
};
//# sourceMappingURL=DocRequestBody.js.map