"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = require("@heroku-cli/command");
const cli_ux_1 = require("cli-ux");
class DomainsInfo extends command_1.Command {
    async run() {
        const { args, flags } = this.parse(DomainsInfo);
        const { body: res } = await this.heroku.get(`/apps/${flags.app}/domains/${args.hostname}`);
        const domain = Object.assign(Object.assign({}, res), { app: res.app && res.app.name });
        cli_ux_1.default.styledObject(domain);
    }
}
exports.default = DomainsInfo;
DomainsInfo.description = 'show detailed information for a domain on an app';
DomainsInfo.examples = [
    '$ heroku domains:info www.example.com',
];
DomainsInfo.flags = {
    help: command_1.flags.help({ char: 'h' }),
    app: command_1.flags.app({ required: true }),
    remote: command_1.flags.remote(),
};
DomainsInfo.args = [{ name: 'hostname', required: true }];
