import { jsxs, jsx } from 'react/jsx-runtime';
import Typography from '../Typography/Typography.js';

const ContentCard = ({ contentHeader, data, maxHeight = '', }) => {
    const normalizeMaxHeightClass = (height) => {
        const num = parseInt(height);
        if (isNaN(num))
            return 'default';
        const rounded = Math.round(num / 100) * 100;
        return Math.min(Math.max(100, rounded), 1000);
    };
    const heightClass = `scrollable-${normalizeMaxHeightClass(maxHeight)}`;
    return (jsxs("div", { className: "ff-content-card-container", children: [jsx("div", { className: "ff-content-card-nav", children: jsx(Typography, { as: "div", fontWeight: 'semi-bold', lineHeight: "35px", children: contentHeader }) }), jsx("div", { className: `ff-content-card-body scrollable ${heightClass}`, children: Object.entries(data).map(([label, value], index) => (jsxs("div", { className: "ff-content-card-row", children: [jsxs(Typography, { fontWeight: "semi-bold", children: [label, ":"] }), jsx(Typography, { className: "ff-content-card-value", children: value })] }, index + label))) })] }));
};

export { ContentCard as default };
//# sourceMappingURL=ContentCard.js.map
