import React__default from 'react';
import { truncateText } from '../../../utils/truncateText/truncateText.js';

const formatCellData = (content, maxLength) => {
    if (typeof content === 'string') {
        return truncateText(content, maxLength);
    }
    if (React__default.isValidElement(content)) {
        return React__default.cloneElement(content, {}, formatCellData(content.props.children, maxLength));
    }
    if (Array.isArray(content)) {
        return content.map((child) => formatCellData(child, maxLength));
    }
    return content;
};

export { formatCellData };
//# sourceMappingURL=formatDataCell.js.map
