import { isPluginEnabled } from "@/lib/plugins/server"; import { currentSeason, SEASON_META } from "@/lib/seasonality"; import { t } from "@/lib/i18n/server"; const TONES = { ok: "bg-[var(--color-karbe-canopy-700)] text-[var(--color-karbe-bone)]", warn: "bg-[var(--color-karbe-laterite-500)] text-[var(--color-karbe-bone)]", info: "bg-[var(--color-karbe-maroni-700)] text-[var(--color-karbe-bone)]", } as const; const SEASON_KEYS = { DRY: { label: "season.dry", message: "season.dry.message" }, LOW_WATER: { label: "season.lowWater", message: "season.lowWater.message" }, WET: { label: "season.wet", message: "season.wet.message" }, } as const; /** * Bandeau saison — affiché en haut de la home et de /carbets si le plugin * `seasonality` est activé. Server component pur, pas de fetch DB. * Texte i18n via t() server-side. */ export async function SeasonBanner() { if (!(await isPluginEnabled("seasonality"))) return null; const season = currentSeason(); const meta = SEASON_META[season]; const keys = SEASON_KEYS[season]; const label = await t(keys.label); const message = await t(keys.message); return ( ); }