"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const BaseCommand_1 = require("../../BaseCommand");
const core_1 = require("@oclif/core");
class LabelCreate extends BaseCommand_1.BaseCommand {
    async run() {
        const label = await this.client.boards.createBoardLabel({
            id: this.lookups.board,
            name: this.flags.name,
            color: this.flags.color,
        });
        await this.cache.sync();
        this.output(label);
    }
    toData(data) {
        return {
            id: data.id,
            name: data.name,
            color: data.color,
        };
    }
}
LabelCreate.description = "Create a label on a board";
LabelCreate.flags = {
    board: core_1.Flags.string({ required: true }),
    name: core_1.Flags.string({ char: "n", required: true }),
    color: core_1.Flags.option({
        required: true,
        options: [
            "green",
            "yellow",
            "orange",
            "red",
            "purple",
            "blue",
            "sky",
            "lime",
            "pink",
            "black",
        ],
    })(),
};
exports.default = LabelCreate;
