/**
 * TO DO: Modify the function to check if Flex is activated. If not, it should return the color.custom
 */
export function getColorByValue(color) {
	if (_.isEmpty(color)) {
		return '';
	}
	let colorStr =
		typeof color !== 'undefined' &&
		typeof color.theme !== 'undefined' &&
		color.theme !== ''
			? 'var(--' + color.theme.replaceAll('/', '--') + ')'
			: color.custom;

	return colorStr;
}
