/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { cyan, gray, green, magenta, white } from "../lib/colors.js";
import { print } from "../lib/print.js";
//#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];
	print(`\n${green(banner)}\n`);
	print(`${magenta("Usage:")} ${white(`${name} <command>`)}\n`);
	if (category === "codemod") {
		print(`${magenta("Codemods:")}`);
		const widest = Math.max(...CODEMOD_SUBCOMMANDS.map((c) => c.name.length)) + 4;
		for (const cmd of CODEMOD_SUBCOMMANDS) print(`  ${cyan(`${name} codemod ${cmd.name}`.padEnd(widest + 12))} ${gray(cmd.description)}`);
	}
	if (notes) print(`\n${magenta("Notes:")} ${notes}`);
	print("");
}
async function getSubCommandsChoices(_props) {
	return CODEMOD_SUBCOMMANDS.map((cmd) => ({
		title: `${cmd.name} (${cmd.description})`,
		value: cmd.name,
		selected: true
	}));
}
//#endregion
export { CODEMOD_SUBCOMMANDS, getCommandHelp, getSubCommandsChoices };
