"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getHeadCellProps = void 0;
const utils_1 = require("../../../utils");
const getHeadCellProps = ({ column, index, sectionOffset, isSelectable, isHideSelectAll, }) => {
    const { label, align, columnHint } = column;
    const field = (0, utils_1.isGroupColumns)(column) ? undefined : column.field;
    const sortable = (0, utils_1.isGroupColumns)(column) ? undefined : column.sortable;
    const globalIndex = (sectionOffset ?? 0) + index;
    const isFirstCell = globalIndex === 0;
    const showCheckbox = isFirstCell && isSelectable && !isHideSelectAll;
    return {
        label,
        align,
        columnHint,
        field,
        sortable,
        showCheckbox,
    };
};
exports.getHeadCellProps = getHeadCellProps;
