import { F as versionForDisplay } from "./util-CsmUMRtR.js";
import { l as createParserProgram } from "./asset-DBj3nifv.js";
import { t as create } from "./create-BF3vSlSR.js";
import { r as runCliCommand } from "./entry-util-Bh1ksaYK.js";
import { Command, Option } from "commander";
//#region src/commands/init.parser.ts
function setupInitParserProgram() {
	const program = new Command();
	program.name("vivliostyle init").description("create vivliostyle config file").option("--title <title>", "title").option("--author <author>", "author").option("-l, --language <language>", "language").option("-s, --size <size>", "paper size").option("-T, --theme <theme>", "theme").addOption(new Option("--log-level <level>", "specify a log level of console outputs").choices([
		"silent",
		"info",
		"verbose",
		"debug"
	]).default("info")).version(versionForDisplay, "-v, --version");
	return program;
}
const parseInitCommand = createParserProgram({
	setupProgram: setupInitParserProgram,
	parseArgs: (options) => ({
		...options,
		projectPath: ".",
		createConfigFileOnly: true,
		template: void 0
	})
});
//#endregion
//#region src/commands/init.runner.ts
async function runInitCli(argv) {
	await runCliCommand(async (cliSignal) => {
		await create({
			...parseInitCommand(argv),
			signal: cliSignal
		});
	});
}
//#endregion
export { runInitCli as t };

//# sourceMappingURL=init.runner-Bob2hmo6.js.map