import { jsx as _jsx } from "react/jsx-runtime";
import { Icon } from '../../../icon/icon.js';
import { useInternalTableState } from '../table-provider/table-provider.js';
import { TableCellBasic } from './basic-cell.js';
const InformationCell = ({ rowIndex, emptyRow }) => {
    const { state: { selectedRowIndexes }, api, } = useInternalTableState();
    const canDelete = api.canDelete();
    return (_jsx(TableCellBasic, { className: "min-w-[40px] max-w-[40px]", children: !emptyRow && canDelete && selectedRowIndexes.includes(rowIndex) && (_jsx("div", { className: "flex h-full w-full items-center justify-center cursor-pointer text-red-900", onClick: () => {
                void api.deleteRows([rowIndex]);
            }, children: _jsx(Icon, { name: "Trash", size: 16 }) })) }));
};
export { InformationCell };
//# sourceMappingURL=information-cell.js.map