import PropTypes from 'prop-types' import { forwardRef } from 'react' // material-ui import { useTheme } from '@mui/material/styles' import { Card, CardContent, CardHeader, Divider, Typography } from '@mui/material' // constant const headerSX = { '& .MuiCardHeader-action': { mr: 0 } } // ==============================|| CUSTOM MAIN CARD ||============================== // const MainCard = forwardRef(function MainCard( { border = true, boxShadow, children, content = true, contentClass = '', contentSX = {}, darkTitle, secondary, shadow, sx = {}, title, ...others }, ref ) { const theme = useTheme() return ( {/* card header and action */} {!darkTitle && title && } {darkTitle && title && {title}} action={secondary} />} {/* content & header divider */} {title && } {/* card content */} {content && ( {children} )} {!content && children} ) }) MainCard.propTypes = { border: PropTypes.bool, boxShadow: PropTypes.bool, children: PropTypes.node, content: PropTypes.bool, contentClass: PropTypes.string, contentSX: PropTypes.object, darkTitle: PropTypes.bool, secondary: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object]), shadow: PropTypes.string, sx: PropTypes.object, title: PropTypes.oneOfType([PropTypes.node, PropTypes.string, PropTypes.object]) } export default MainCard