import { color, hux } from '@heroku/heroku-cli-util';
import { ux } from '@oclif/core/ux';
export const printGroups = function (teams, type) {
    const typeLabel = type.label ?? 'Team';
    teams = teams.sort((a, b) => (a.name || '').localeCompare(b.name || ''));
    hux.table(teams, {
        name: {
            get: ({ name }) => color.team(name),
            header: typeLabel,
        },
        role: {
            get: ({ role }) => role,
            header: 'Role',
        },
    });
};
export const printGroupsJSON = function (teams) {
    ux.stdout(JSON.stringify(teams, null, 2));
};
