//#region src/utils/string.ts
/**
* Normalizes a string to be used as an identifier
* - Converts to lowercase
* - Replaces spaces and special characters with hyphens
* - Removes consecutive hyphens
* - Trims leading/trailing hyphens
*/
const normalizeToId = (str) => {
	return str.toLowerCase().replace(/\s+/g, "-").replace(/[^a-z0-9-]/g, "-").replace(/-+/g, "-").replace(/^-+|-+$/g, "");
};
/**
* Generates a menu item ID from title and level
*/
const generateMenuItemId = (title, level = 0) => {
	const normalizedTitle = normalizeToId(title);
	return normalizedTitle ? `${normalizedTitle}-${level}` : `item-${level}`;
};

//#endregion
export { generateMenuItemId, normalizeToId };
globalThis.__vuiVersion__ = "4.0.0-beta.1"
//# sourceMappingURL=string.js.map