import { isGroupColumns } from '../isGroupColumns';
export const getFlattenColumns = (columns, pinned) => {
    return columns.flatMap((column) => {
        const currentPinned = column.pinned ?? pinned;
        if (isGroupColumns(column)) {
            return getFlattenColumns(column.children, currentPinned);
        }
        return {
            ...column,
            pinned: currentPinned,
        };
    });
};
