"use client";
import { topCountries } from "../data/country-data";
import { useLanguage } from "@/components/LanguageContext";
function PreviewMetricRow({ label, value }: { label: string; value: string }) {
return (
{label}
{value}
);
}
function PreviewFeatureCard({
title,
description,
items,
footer,
}: {
title: string;
description?: string;
items?: string[];
footer?: { label: string; note: string };
}) {
return (
{title}
{description && (
{description}
)}
{items && items.length > 0 && (
{items.map((item) => (
-
▸
{item}
))}
)}
{footer && (
{footer.label}
{footer.note}
)}
);
}
export function DashboardPreviewMetrics() {
const { t } = useLanguage();
const metrics = [
{ label: t("dashboardMetricApiKeys"), value: t("dashboardMetricApiKeysValue") },
{ label: t("dashboardMetricModels"), value: t("dashboardMetricModelsValue") },
{ label: t("dashboardMetricRequests"), value: t("dashboardMetricRequestsValue") },
{ label: t("dashboardMetricBalance"), value: t("dashboardMetricBalanceValue") },
{ label: t("dashboardMetricTopModel"), value: t("dashboardMetricTopModelValue") },
{ label: t("dashboardMetricSpend"), value: t("dashboardMetricSpendValue") },
];
return (
{t("dashboardPreviewOnly")}
{metrics.map((m) => (
))}
);
}
export function PlannedProviderRegions() {
const { t } = useLanguage();
return (
{t("dashboardPlannedRegions")}
{topCountries.map((country) => (
-
■
{country.code}
))}
);
}
export function RegionCount() {
const { t } = useLanguage();
return (
▲
{t("dashboardRegionCountLabel")}
);
}
export function StatsGrid() {
const { t } = useLanguage();
const cards = [
{ title: t("dashboardCard1Title"), description: t("dashboardCard1Desc") },
{ title: t("dashboardCard2Title"), description: t("dashboardCard2Desc") },
{ title: t("dashboardCard3Title"), description: t("dashboardCard3Desc") },
{ title: t("dashboardCard4Title"), description: t("dashboardCard4Desc") },
{ title: t("dashboardCard5Title"), description: t("dashboardCard5Desc") },
{ title: t("dashboardCard6Title"), description: t("dashboardCard6Desc") },
{
title: t("dashboardCard7Title"),
items: [
t("dashboardCard7Item1"),
t("dashboardCard7Item2"),
t("dashboardCard7Item3"),
t("dashboardCard7Item4"),
t("dashboardCard7Item5"),
],
},
{
title: t("dashboardCard8Title"),
description: t("dashboardCard8Desc"),
footer: {
label: t("dashboardCard8Savings"),
note: t("dashboardCard8SavingsNote"),
},
},
];
return (
{cards.map((card) => (
))}
);
}