export const CALCULATED_COLUMN_TYPE = 'calculatedColumn';
export const FREE_TEXT_COLUMN_TYPE = 'freeTextColumn';
export const ACTION_COLUMN_TYPE = 'actionColumn';
export const FDC3_COLUMN_TYPE = 'fdc3Column';
// this is only implemented for 1 level groups
export const isValidOrderForColumnGroups = ({ oldColumns, newColumns, }) => {
    const getGroups = (columns) => {
        let prevGroup = '';
        let count = 0;
        columns.forEach((column) => {
            if (column &&
                column.columnGroup &&
                column.columnGroup.groupCount > 1 &&
                !column.columnGroup.allowGroupSplit) {
                if (prevGroup !== column.columnGroup.columnGroupId) {
                    count++;
                }
            }
            prevGroup = column?.columnGroup?.columnGroupId ?? '';
        });
        return count;
    };
    if (getGroups(oldColumns) != getGroups(newColumns)) {
        return false;
    }
    return true;
};
