import { isValidElement } from "react";
import { clsx } from "clsx";
import { twMerge } from "tailwind-merge";
//#region src/lib/utils.ts
function cn(...inputs) {
	return twMerge(clsx(inputs));
}
/** Normalize an array of strings or {value, label} objects to consistent object format */
function normalizeOptions(options) {
	if (!options) return [];
	return options.map((opt) => typeof opt === "string" ? {
		value: opt,
		label: opt
	} : opt);
}
/** Extract plain text from React children (for accessible labels, filtering, etc.) */
function extractText(node) {
	if (node == null || typeof node === "boolean") return "";
	if (typeof node === "string" || typeof node === "number") return String(node);
	if (Array.isArray(node)) return node.map(extractText).join(" ");
	if (isValidElement(node)) {
		const props = node.props;
		return extractText(props.children);
	}
	return "";
}
//#endregion
export { cn, extractText, normalizeOptions };

//# sourceMappingURL=index3.js.map