"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const core_1 = require("@oclif/core");
const BaseCommand_1 = require("../../BaseCommand");
const index_1 = require("../../index");
class AuthApiKey extends BaseCommand_1.BaseCommand {
    constructor() {
        super(...arguments);
        this.defaultOutput = "raw";
    }
    async run() {
        const { args } = await this.parse(AuthApiKey);
        this.trelloConfig.setApiKey(args.api_key);
        this.output("✅ API Key set\n");
        // Run the CLI again to show the next step
        await (0, index_1.run)(["auth"]);
    }
}
AuthApiKey.description = "Set the Trello API key (used to generate a token)";
AuthApiKey.args = {
    api_key: core_1.Args.string({ required: true }),
};
exports.default = AuthApiKey;
