//#region src/gui/theme.ts
/**
* Editframe GUI Theme Utilities
*
* Shared utilities for working with theme tokens.
*/
/**
* Fallback colors for element types when CSS variables are not available.
* These match the default values in ef-theme.css.
*/
const fallbackTypeColors = {
	video: "rgb(59, 130, 246)",
	audio: "rgb(34, 197, 94)",
	image: "rgb(168, 85, 247)",
	text: "rgb(249, 115, 22)",
	captions: "rgb(34, 197, 94)",
	timegroup: "rgb(148, 163, 184)"
};
/**
* Get the color for a specific element type from CSS variables.
* Falls back to hardcoded values if the CSS variable is not defined.
*
* @param type - The element type (video, audio, image, text, captions, timegroup)
* @param element - Optional element to compute styles from (defaults to document.documentElement)
* @returns The color string (rgb format)
*/
function getElementTypeColor(type, element = document.documentElement) {
	const varName = `--ef-color-type-${type}`;
	return getComputedStyle(element).getPropertyValue(varName).trim() || fallbackTypeColors[type] || fallbackTypeColors.timegroup;
}

//#endregion
export { getElementTypeColor };
//# sourceMappingURL=theme.js.map