"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BaseCommand_1 = require("../../BaseCommand");
const core_1 = require("@oclif/core");
class Assign extends BaseCommand_1.BaseCommand {
    async run() {
        const card = await this.client.cards.addCardMember({
            id: this.lookups.card,
            value: this.lookups.user,
        });
        this.output(card);
    }
    toData(data) {
        data = data[0];
        return {
            id: data.id,
            username: data.username,
            fullName: data.fullName,
            initials: data.initials,
        };
    }
}
Assign.description = "Assign a card";
Assign.flags = {
    card: core_1.Flags.string({ required: true }),
    board: core_1.Flags.string({ required: true }),
    list: core_1.Flags.string({ required: true }),
    user: core_1.Flags.string({ required: true }),
};
exports.default = Assign;
