import {useState} from 'react';
import {makeProvider} from '../../_lib';
import * as defaultTheme from '../../theme';
import {useSiteSettings} from '../site';

function useTheme() {
  const [theme, setTheme] = useState(defaultTheme);
  return {theme, setTheme};
}

export const {
  Provider: ThemeProvider,
  useProvider: useThemeProvider,
} = makeProvider(useTheme);
