import { InfoCard, CodeSnippet } from '@backstage/core-components';
import { Typography } from '@material-ui/core';
import React from 'react';
import { generateYAMLCode } from '../../utils/generateYAMLCode.esm.js';

const defaultYAMLCodeData = {
  limits: {
    cpu: "-",
    memory: "-"
  },
  requests: {
    cpu: "-",
    memory: "-"
  }
};
const CodeInfoCard = ({
  cardTitle,
  showCopyCodeButton,
  yamlCodeData
}) => {
  const YAMLCode = generateYAMLCode(yamlCodeData || defaultYAMLCodeData);
  return /* @__PURE__ */ React.createElement(
    InfoCard,
    {
      title: /* @__PURE__ */ React.createElement(Typography, { variant: "body1", style: { fontWeight: "bold" } }, cardTitle)
    },
    /* @__PURE__ */ React.createElement(
      CodeSnippet,
      {
        text: YAMLCode,
        language: "yaml",
        showCopyCodeButton
      }
    )
  );
};

export { CodeInfoCard };
//# sourceMappingURL=CodeInfoCard.esm.js.map
