"use client" import { Dialog, DialogContent, DialogHeader, DialogTitle, } from "@/components/ui/dialog" import { cn } from "@/lib/utils" import { MAIL_BACKGROUND_PRESETS, normalizeMailBackgroundId, } from "@/lib/mail-settings/constants" import type { MailBackgroundId, MailThemeMode } from "@/lib/mail-settings/types" import { useMailSettingsStore } from "@/lib/stores/mail-settings-store" const THEME_OPTIONS: { id: MailThemeMode; label: string; previewClass: string }[] = [ { id: "light", label: "Clair", previewClass: "bg-white" }, { id: "dark", label: "Sombre", previewClass: "bg-[#202124]" }, { id: "system", label: "Système", previewClass: "bg-gradient-to-br from-white from-50% to-[#202124] to-50%", }, ] export function ThemeSettingsDialog() { const open = useMailSettingsStore((s) => s.themeDialogOpen) const setOpen = useMailSettingsStore((s) => s.setThemeDialogOpen) const themeMode = useMailSettingsStore((s) => s.themeMode) const backgroundId = useMailSettingsStore((s) => s.backgroundId) const setThemeMode = useMailSettingsStore((s) => s.setThemeMode) const setBackgroundId = useMailSettingsStore((s) => s.setBackgroundId) const activeBackgroundId = normalizeMailBackgroundId(backgroundId) return ( Thème

Mode

{THEME_OPTIONS.map((opt) => ( ))}

Arrière-plan

{MAIL_BACKGROUND_PRESETS.map((preset) => ( ))}
) }