/*! © 2026 Yahoo, Inc. UDS v0.0.0-development */
//#region src/cli/commands/purge.helpers.ts
const isTruthyFlag = (value) => value === true || value === "true";
const stringOption = (value) => typeof value === "string" ? value : void 0;
const entryOption = (value) => {
	if (typeof value === "string") return value;
	if (Array.isArray(value) && value.every((item) => typeof item === "string")) return value;
};
const shouldShowHelp = (options) => isTruthyFlag(options.help) || isTruthyFlag(options.h);
const isOptimizedPurgeEnabled = (options) => isTruthyFlag(options.optimized);
const getPurgeRunOptions = (options) => ({
	config: stringOption(options.config),
	entry: entryOption(options.entry),
	optimized: isOptimizedPurgeEnabled(options),
	output: stringOption(options.output)
});
//#endregion
export { getPurgeRunOptions, isOptimizedPurgeEnabled, shouldShowHelp };
