"use client"; import { type TimeRange } from "@/lib/utils"; import { useI18n } from "@/lib/i18n"; import { motion } from "motion/react"; export function TimeRangeSelector({ value, onChange, }: { value: TimeRange; onChange: (v: TimeRange) => void; }) { const { t } = useI18n(); const ranges: { label: string; value: TimeRange }[] = [ { label: t("time.today"), value: "today" }, { label: t("time.7d"), value: "7d" }, { label: t("time.30d"), value: "30d" }, { label: t("time.all"), value: "all" }, ]; return (