import { Table, TableBody, TableCell, TableContainer, TableHead, TableRow } from "@mui/material"; import { NutritionalValues } from "@/components/Nutrition/helpers/nutritionalValues"; import { useTranslation } from "react-i18next"; import { numberGramLocale, numberLocale } from "@/core/lib/numbers"; export const LoggedPlannedNutritionalValuesTable = (props: { planned: NutritionalValues, logged: NutritionalValues }) => { const [t, i18n] = useTranslation(); return {t('nutrition.macronutrient')} {t('nutrition.planned')} {t('nutrition.logged')} {t('nutrition.difference')} {t('nutrition.energy')} {t('nutrition.valueEnergyKcalKj', { kcal: numberLocale(props.planned.energy, i18n.language), kj: numberLocale(props.planned.energyKj, i18n.language) })} {t('nutrition.valueEnergyKcalKj', { kcal: numberLocale(props.logged.energy, i18n.language), kj: numberLocale(props.logged.energyKj, i18n.language) })} {t('nutrition.valueEnergyKcalKj', { kcal: numberLocale(props.logged.energy - props.planned.energy, i18n.language), kj: numberLocale(props.logged.energyKj - props.planned.energyKj, i18n.language) })} {t('nutrition.protein')} {numberGramLocale(props.planned.protein, i18n.language)} {numberGramLocale(props.logged.protein, i18n.language)} {numberGramLocale(props.logged.protein - props.planned.protein, i18n.language)} {t('nutrition.carbohydrates')} {numberGramLocale(props.planned.carbohydrates, i18n.language)} {numberGramLocale(props.logged.carbohydrates, i18n.language)} {numberGramLocale(props.logged.carbohydrates - props.planned.carbohydrates, i18n.language)} {t('nutrition.ofWhichSugars')} {numberGramLocale(props.planned.carbohydratesSugar, i18n.language)} {numberGramLocale(props.logged.carbohydratesSugar, i18n.language)} {numberGramLocale(props.logged.carbohydratesSugar - props.planned.carbohydratesSugar, i18n.language)} {t('nutrition.fat')} {numberGramLocale(props.planned.fat, i18n.language)} {numberGramLocale(props.logged.fat, i18n.language)} {numberGramLocale(props.logged.fat - props.planned.fat, i18n.language)} {t('nutrition.ofWhichSaturated')} {numberGramLocale(props.planned.fatSaturated, i18n.language)} {numberGramLocale(props.logged.fatSaturated, i18n.language)} {numberGramLocale(props.logged.fatSaturated - props.planned.fatSaturated, i18n.language)} {t('nutrition.others')} {t('nutrition.fibres')} {numberGramLocale(props.planned.fiber, i18n.language)} {numberGramLocale(props.logged.fiber, i18n.language)} {numberGramLocale(props.logged.fiber - props.planned.fiber, i18n.language)} {t('nutrition.sodium')} {numberGramLocale(props.planned.sodium, i18n.language)} {numberGramLocale(props.logged.sodium, i18n.language)} {numberGramLocale(props.logged.sodium - props.planned.sodium, i18n.language)}
; };