"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const command_1 = require("@oclif/command");
const help_1 = __importDefault(require("../extends/command/help"));
const account_1 = __importDefault(require("../implements/account"));
class Tenant extends help_1.default {
    async run() {
        this.warn('This command will no longer be supported in the future');
        const { args } = this.parse(Tenant);
        const account = new account_1.default();
        account.eventTracker('tenant_start', { tags: Object.assign(Object.assign({}, args), command_1.flags) });
        account_1.default.checkTokenExist(this.id);
        switch (args.command) {
            case 'switch':
                await account.switchTenant();
                break;
            default:
                break;
        }
    }
}
exports.default = Tenant;
Tenant.description = 'Manage tenant with current account';
Tenant.flags = {
    help: command_1.flags.help({
        char: 'h',
    }),
};
Tenant.args = [
    {
        name: 'command',
        options: ['switch'],
    },
    {
        name: 'tenant',
        hidden: true,
    },
];
Tenant.examples = [['$ {{cli}} tenant switch', 'switch your tenant']];
