import React, { useMemo } from "react";
import { ThemeProvider } from "styled-components";
import { defaultTheme, GlobalStyle } from ".";
import { palettes } from "@ledgerhq/ui-shared";
import "./override";
export const StyleProvider = ({ children, fontsPath, fontMappings, selectedPalette = "light", }) => {
    const theme = useMemo(() => (Object.assign(Object.assign({}, defaultTheme), { colors: Object.assign(Object.assign(Object.assign({}, defaultTheme.colors), palettes[selectedPalette]), { palette: palettes[selectedPalette] }), theme: selectedPalette })), [selectedPalette]);
    return (React.createElement(ThemeProvider, { theme: theme },
        React.createElement(GlobalStyle, { fontsPath: fontsPath, fontMappings: fontMappings }),
        children));
};
//# sourceMappingURL=StyleProvider.js.map