"use client"

import type { MailThemeMode } from "@/lib/mail-settings/types"
import { useClientThemeStore } from "@/lib/stores/client-theme-store"

/** Thème clair/sombre/système — préférence client (localStorage), globale à la web app. */
export function useThemeModeControls(): {
  themeMode: MailThemeMode
  setThemeMode: (mode: MailThemeMode) => void
} {
  const themeMode = useClientThemeStore((s) => s.themeMode)
  const setThemeMode = useClientThemeStore((s) => s.setThemeMode)
  return { themeMode, setThemeMode }
}
