import { Command, flags } from '@heroku-cli/command';
import { ux } from '@oclif/core/ux';
export default class MaintenanceIndex extends Command {
    static description = 'display the current maintenance status of app';
    static flags = {
        app: flags.app({ required: true }),
        remote: flags.remote(),
    };
    static topic = 'maintenance';
    async run() {
        const { flags } = await this.parse(MaintenanceIndex);
        const appResponse = await this.heroku.get(`/apps/${flags.app}`);
        const app = appResponse.body;
        ux.stdout(app.maintenance ? 'on' : 'off');
    }
}
