"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BaseCommand_1 = require("../../BaseCommand");
const core_1 = require("@oclif/core");
class CardComment extends BaseCommand_1.BaseCommand {
    async run() {
        const comment = await this.client.cards.addCardComment({
            id: this.lookups.card,
            text: this.flags.text,
        });
        this.output(comment);
    }
    toData(data) {
        return {
            id: data.id,
            text: data.data.text,
            date: data.date,
            memberCreator: data.memberCreator.fullName,
        };
    }
}
CardComment.description = "Add a comment to a card";
CardComment.flags = {
    board: core_1.Flags.string({ required: true }),
    list: core_1.Flags.string({ required: true }),
    card: core_1.Flags.string({ required: true }),
    text: core_1.Flags.string({ required: true }),
};
exports.default = CardComment;
