import { attr, nullableNumberConverter } from '@ni/fast-element';
// As the returned class is internal to the function, we can't write a signature that uses is directly, so rely on inference
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/explicit-function-return-type
export function mixinGroupableColumnAPI(base) {
    /**
     * The Mixin that provides a concrete column with the API to allow grouping
     * by the values in that column.
     */
    class GroupableColumn extends base {
        constructor() {
            super(...arguments);
            this.groupingDisabled = false;
        }
        groupingDisabledChanged() {
            this.columnInternals.groupingDisabled = this.groupingDisabled;
        }
        groupIndexChanged() {
            this.columnInternals.groupIndex = this.groupIndex ?? undefined;
        }
    }
    attr({ attribute: 'grouping-disabled', mode: 'boolean' })(GroupableColumn.prototype, 'groupingDisabled');
    attr({ attribute: 'group-index', converter: nullableNumberConverter })(GroupableColumn.prototype, 'groupIndex');
    return GroupableColumn;
}
//# sourceMappingURL=groupable-column.js.map