` so the parent stays Locale-
+ * agnostic.
+ */
+export interface SuggestedPromptsProps {
+ /**
+ * Override the default prompt list. When omitted, the component
+ * resolves the 5 defaults from `insights.suggestedPrompts.*`.
+ * Useful for tests + future per-user prompt sets.
+ */
+ prompts?: string[];
+ /** Click handler — receives the localised prompt string. */
+ onPick: (prompt: string) => void;
+ /** Optional className passthrough for layout overrides. */
+ className?: string;
+}
+
+const DEFAULT_PROMPT_KEYS = [
+ "whyMonday",
+ "weightVsPulse",
+ "weekVsMonth",
+ "tellMyDoctor",
+ "medicationWorking",
+] as const;
+
+export function SuggestedPrompts({
+ prompts,
+ onPick,
+ className,
+}: SuggestedPromptsProps) {
+ const { t } = useTranslations();
+ const items =
+ prompts ??
+ DEFAULT_PROMPT_KEYS.map((key) => t(`insights.suggestedPrompts.${key}`));
+
+ return (
+
+
+ {t("insights.suggestedPrompts.label")}
+
+ {items.map((prompt) => (
+
+ ))}
+
+ );
+}