import React from 'react';
import classnames from 'classnames';
import { DefaultCellRenderer } from '../../helpers';
import { useStyles } from './styles';
export var TableCell = function (_a) {
    var _b;
    var columnValue = _a.columnValue, rowData = _a.rowData, setHoveredColumn = _a.setHoveredColumn, resetHoveredColumn = _a.resetHoveredColumn, rowIsDragging = _a.rowIsDragging;
    var styles = useStyles();
    var CellRenderer = rowData.cellRenderer || DefaultCellRenderer;
    var onMouseOver = setHoveredColumn ? function () { return setHoveredColumn(columnValue); } : undefined;
    return (React.createElement("td", { onMouseOver: onMouseOver, onMouseLeave: resetHoveredColumn },
        React.createElement("div", { className: classnames((_b = {}, _b[styles.hidden] = rowIsDragging, _b)) },
            React.createElement(CellRenderer, { value: columnValue[rowData.id] }))));
};
