import { Args, Flags } from '@oclif/core';
import BaseCommand from '../../lib/baseCommand.js';
import PathNormalizer from '../../lib/pathNormalizer.js';
import ScriptCreator from '../../lib/scripts/scriptCreator.js';
export default class ScriptsNew extends BaseCommand {
    static args = {
        destination: Args.string({ description: 'Destination', required: true }),
    };
    static description = 'Create a new script';
    static descriptionGerund = 'Creating new script';
    static flags = {
        template: Flags.string({ char: 't', description: 'Template name', required: true }),
    };
    async runImpl() {
        const destPath = PathNormalizer.normalize(this.parsedArgs.destination, false);
        await new ScriptCreator(this.parsedFlags.template, destPath).create();
    }
}
