"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
    var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
    if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
    else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
    return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
    if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.FixturesSetupCommand = void 0;
const nest_commander_1 = require("nest-commander");
const fixtures_service_1 = require("../../services/fixtures.service");
let FixturesSetupCommand = class FixturesSetupCommand extends nest_commander_1.CommandRunner {
    constructor(fixturesService) {
        super();
        this.fixturesService = fixturesService;
    }
    async run(_passedParam, options) {
        await this.fixturesService.setupFixtures(options.module, options.scenario);
    }
    parseScenario(val) {
        return val;
    }
    parseModule(val) {
        return val;
    }
};
exports.FixturesSetupCommand = FixturesSetupCommand;
__decorate([
    (0, nest_commander_1.Option)({
        flags: '-s, --scenario [scenario name]',
        description: 'Setup scenario name for the fixtures command',
        required: true,
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String]),
    __metadata("design:returntype", String)
], FixturesSetupCommand.prototype, "parseScenario", null);
__decorate([
    (0, nest_commander_1.Option)({
        flags: '-m, --module-name [module name]',
        description: 'Module Name from the ss_model_metadata table',
        required: true,
    }),
    __metadata("design:type", Function),
    __metadata("design:paramtypes", [String]),
    __metadata("design:returntype", String)
], FixturesSetupCommand.prototype, "parseModule", null);
exports.FixturesSetupCommand = FixturesSetupCommand = __decorate([
    (0, nest_commander_1.Command)({
        name: 'fixtures setup',
        description: 'Handles setup and tear down of fixtures for the SolidX application',
    }),
    __metadata("design:paramtypes", [fixtures_service_1.FixturesService])
], FixturesSetupCommand);
//# sourceMappingURL=fixtures-setup.command.js.map