import { useNavigation } from "react-router"; import clsx from "clsx"; import { useTranslation } from "react-i18next"; import { Stat } from "~/application/dtos/stats/Stat"; import { StatChange } from "~/application/dtos/stats/StatChange"; import { ArrowUpIcon, ArrowDownIcon } from "~/components/ui/icons/vendor"; interface Props { items: Stat[]; } function getStatChangeScreenReaderKey(changeType: StatChange | undefined) { if (changeType === StatChange.Increase) { return "components.stats.change.increasedBy"; } if (changeType === StatChange.Decrease) { return "components.stats.change.decreasedBy"; } return "components.stats.change.noChange"; } export function EntitiesStats({ items }: Props) { const { t } = useTranslation(); const navigation = useNavigation(); const loading = navigation.state === "loading"; return (