"use client";

import '@radix-ui/themes/styles.css';
import { Theme } from "@radix-ui/themes";
import { useEffect, useState } from 'react';
import useThemePreference from '../../hooks/useThemePreference';

export default function ThemeWrapper({
  children,
}: {
  children: React.ReactNode
}) {
  const dark = useThemePreference();

  return <Theme
    accentColor='crimson'
    grayColor='slate'
    radius='large'
    scaling='95%'
    appearance={dark ? 'dark' : 'light'}
  >
    {children}
  </Theme>;
};
