/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
const require_colors = require('../lib/colors.cjs');
const require_print = require('../lib/print.cjs');

//#region ../cli/dist/utils/getCommandHelp.mjs
/*! © 2026 Yahoo, Inc. UDS CLI v0.0.0-development */
const CODEMOD_SUBCOMMANDS = [
	{
		name: "sizingProps",
		description: "Convert sizing props to classNames"
	},
	{
		name: "spacingProps",
		description: "Migrate spacing props from old to new values"
	},
	{
		name: "tailwindClassesToProps",
		description: "Convert Tailwind classes to UDS props"
	},
	{
		name: "flattenButtonVariant",
		description: "Flatten Button variant props"
	},
	{
		name: "buttonType",
		description: "Add type attribute to Button components"
	}
];
const banner = `
█ █ █▀▄ ▄▀▀   ▄▀▀ █   █
▀▄█ █▄▀ ▄██   ▀▄▄ █▄▄ █
Universal Design System
`.trim();
async function getCommandHelp(props) {
	const { name, commandPath, notes } = props;
	const category = commandPath?.[0];
	require_print.print(`\n${require_colors.green(banner)}\n`);
	require_print.print(`${require_colors.magenta("Usage:")} ${require_colors.white(`${name} <command>`)}\n`);
	if (category === "codemod") {
		require_print.print(`${require_colors.magenta("Codemods:")}`);
		const widest = Math.max(...CODEMOD_SUBCOMMANDS.map((c) => c.name.length)) + 4;
		for (const cmd of CODEMOD_SUBCOMMANDS) require_print.print(`  ${require_colors.cyan(`${name} codemod ${cmd.name}`.padEnd(widest + 12))} ${require_colors.gray(cmd.description)}`);
	}
	if (notes) require_print.print(`\n${require_colors.magenta("Notes:")} ${notes}`);
	require_print.print("");
}
async function getSubCommandsChoices(_props) {
	return CODEMOD_SUBCOMMANDS.map((cmd) => ({
		title: `${cmd.name} (${cmd.description})`,
		value: cmd.name,
		selected: true
	}));
}

//#endregion
exports.CODEMOD_SUBCOMMANDS = CODEMOD_SUBCOMMANDS;
exports.getCommandHelp = getCommandHelp;
exports.getSubCommandsChoices = getSubCommandsChoices;