<script lang="ts">
	import type { AggregatedFood } from '$lib/database/food'

	export let item: AggregatedFood
</script>

<template>
	<tr class="border-b border-gray-200 dark:border-gray-700">
		<th class="px-6 py-4 font-medium text-gray-900 whitespace-nowrap bg-gray-50 dark:text-white dark:bg-gray-800"
		    scope="row">
			{item.period}
		</th>
		<td class="px-6 py-4">
			{item.amount}
		</td>
		<td class="px-6 py-4 bg-gray-50 dark:bg-gray-800">
			{item.avgPer100}
		</td>
		<td class="px-6 py-4">
			{item.energy}
		</td>
	</tr>
</template>
