"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const React = tslib_1.__importStar(require("react"));
const isPlainObject_1 = tslib_1.__importDefault(require("../../Utilities/utils/isPlainObject"));
exports.default = ({ domProps, item, onItemClick, index, columns, className, idProperty, style, }) => {
    const key = item[idProperty] || index;
    if (!(0, isPlainObject_1.default)(item)) {
        return (React.createElement("tr", { onClick: onItemClick, key: key, className: className, ...domProps },
            React.createElement("td", { colSpan: columns.length, style: style }, item)));
    }
    return (React.createElement("tr", { onClick: onItemClick, key: key, className: className, ...domProps }, columns.map((col) => {
        return (React.createElement("td", { key: col, style: style }, item[col]));
    })));
};
