import React from 'react';
import { get } from 'lodash';
import StyledSum from '../../primitives/Sum';
import StyledSumResult from '../../primitives/SumResult';
import Html from '../helper/Html';
import { RenderWithData } from '../../index';
export default function Evaluation({
data,
testing,
groupedSimple,
happy,
sad,
showValue,
unit,
}: RenderWithData<"Evaluation">) {
let testedValue: number = 0;
if (Array.isArray(testing)) {
testedValue = get(data, testing[0]) - get(data, testing[1]);
} else if (testing) {
testedValue = get(data, testing);
}
const absTestedValue = Math.abs(testedValue);
if (showValue) {
if (testedValue < 0) {
return (