// frontend/components/ThemeProvider.tsx
"use client";
import { ThemeProvider as NextThemes } from "next-themes";

export function ThemeProvider({ children }: { children: React.ReactNode }) {
  return (
    <NextThemes
      attribute="data-theme" // <html data-theme="light|dark">  ← 토큰 셀렉터와 일치
      defaultTheme="light" // 원본 대시보드.html data-theme="light"
      enableSystem={false} // MVP: 시스템 추종 끔(명시 토글만)
      storageKey="ari-theme" // localStorage 키
      disableTransitionOnChange // 토글 시 전체 transition 깜빡임 억제
    >
      {children}
    </NextThemes>
  );
}
