"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
const core_1 = require("@oclif/core");
const command_base_tenantless_1 = require("../../command-base-tenantless");
class BranchCurrent extends command_base_tenantless_1.CommandBaseTenantless {
    run() {
        return tslib_1.__awaiter(this, void 0, void 0, function* () {
            return new Promise((resolve, reject) => tslib_1.__awaiter(this, void 0, void 0, function* () {
                try {
                    this.bootstrap();
                    const { args, flags } = yield this.parse(BranchCurrent);
                    let branches = yield this._ops.gitEachCurrentBranch();
                    for (let key in branches) {
                        this._ui.userMessage(`${branches[key].name}  (${key})`);
                    }
                    resolve();
                }
                catch (err) {
                    this.handleError(err);
                    reject(err);
                }
            }));
        });
    }
}
exports.default = BranchCurrent;
BranchCurrent.description = 'Renders the name of the current branch (for the main project and for any sourced dependencies).';
BranchCurrent.aliases = ["branches:current"];
BranchCurrent.flags = {
    help: core_1.Flags.help({ char: 'h' })
};
BranchCurrent.args = {};
//# sourceMappingURL=current.js.map