import { Command } from '@heroku-cli/command';
import * as color from '@heroku/heroku-cli-util/color';
import { Args } from '@oclif/core';
import { displayTelemetryDrain } from '../../lib/telemetry/util.js';
export default class Info extends Command {
    static args = {
        telemetry_drain_id: Args.string({ description: 'ID of the drain to show info for', required: true }),
    };
    static description = 'show a telemetry drain\'s info';
    static example = `${color.command('heroku telemetry:info 022e2e2e-2e2e-2e2e-2e2e-2e2e2e2e2e2e')}`;
    static topic = 'telemetry';
    async run() {
        const { args } = await this.parse(Info);
        const { telemetry_drain_id } = args;
        const { body: telemetryDrain } = await this.heroku.get(`/telemetry-drains/${telemetry_drain_id}`, {
            headers: {
                Accept: 'application/vnd.heroku+json; version=3.sdk',
            },
        });
        await displayTelemetryDrain(telemetryDrain, this.heroku);
    }
}
