/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
import { variants } from "../styles/variants.js";
import { components_exports } from "../components/index.js";
import { run } from "./dist/cli.js";
import { makeCSSCommand } from "../tailwind/dist/commands/css.js";
import { makeGenerateComponentDataCommand } from "../tailwind/dist/commands/generateComponentData.js";
import { makeGeneratePurgeCSSDataCommand } from "../tailwind/dist/commands/generatePurgeCSSData.js";
import { makePurgeCommand } from "../tailwind/dist/commands/purge.js";
import package_default from "../uds/package.js";
import { experimental_exports } from "../components/experimental/index.js";
import { syncCommand } from "./commands/sync.js";
import { versionCommand } from "./commands/version.js";
import { join } from "node:path";
import { Project } from "ts-morph";

//#region src/cli/runner.ts
run([
	versionCommand,
	makePurgeCommand(async () => {
		const componentData = await import("../uds/generated/componentData.js");
		return {
			variants,
			packageJson: package_default,
			generatedPurgeCssData: await import("../uds/generated/tailwindPurge.js"),
			autoVariants: (await import("../automated-config/dist/generated/autoVariants.js")).autoVariants,
			componentData
		};
	}),
	makeGeneratePurgeCSSDataCommand(async () => {
		return {
			project: new Project({ tsConfigFilePath: join(process.cwd(), `./tsconfig.json`) }),
			variants,
			UDS: components_exports,
			UDS_EXPERIMENTAL: experimental_exports
		};
	}),
	makeGenerateComponentDataCommand(async () => {
		return {
			project: new Project({
				tsConfigFilePath: join(process.cwd(), `./tsconfig.json`),
				skipFileDependencyResolution: true
			}),
			componentsDir: join(process.cwd(), "src/components"),
			outputFile: join(process.cwd(), "generated/componentData.json")
		};
	}),
	makeCSSCommand(async () => {
		const componentData = await import("../uds/generated/componentData.js");
		return {
			variants,
			autoVariants: (await import("../automated-config/dist/generated/autoVariants.js")).autoVariants,
			componentData
		};
	}),
	syncCommand
]);

//#endregion