import { jsx as _jsx } from "react/jsx-runtime";
import { cn } from '../../../scalars/lib/utils.js';
import { getTextAlignmentClasses } from './utils.js';
const renderDateCell = (value, context) => {
    const formatDate = (dateValue) => {
        if (!dateValue)
            return '';
        try {
            const date = new Date(dateValue);
            if (isNaN(date.getTime()))
                return typeof dateValue === 'string' ? dateValue : '';
            return date.toLocaleDateString();
        }
        catch {
            return typeof dateValue === 'string' ? dateValue : '';
        }
    };
    return _jsx("div", { className: cn(getTextAlignmentClasses(context), 'font-semibold'), children: formatDate(value) });
};
export { renderDateCell };
//# sourceMappingURL=date-render.js.map