import type { PropsWithChildren } from "react";

export type FoundationThemeProviderProps = {
  className?: string;
};

/**
 * Foundation Theme Provider — `.uds-theme-root` 클래스를 부여해
 * CSS 변수 토큰이 적용될 루트를 명시한다.
 */
function ThemeProvider({
  children,
  className,
}: PropsWithChildren<FoundationThemeProviderProps>) {
  const classNames = ["uds-theme-root"];
  if (className) {
    classNames.push(className);
  }

  return <div className={classNames.join(" ")}>{children}</div>;
}

export { ThemeProvider };
