/*
Copyright (c) 2018 Uber Technologies, Inc.

This source code is licensed under the MIT license found in the
LICENSE file in the root directory of this source tree.
*/
import * as React from 'react';
import { Provider as StyletronProvider } from 'styletron-react';
import { Client as Styletron } from 'styletron-engine-atomic';
import { ThemeProvider } from '../styles/index.js';
import { LightTheme } from '../themes/index.js';
var engine = new Styletron();
export var withStyletronProvider = function withStyletronProvider(Component) {
  return function withStyletronProviderHOC(props) {
    return React.createElement(StyletronProvider, {
      value: engine
    }, React.createElement(Component, props));
  };
};
export var withThemeProvider = function withThemeProvider(Component) {
  return function withThemeProviderHOC(props) {
    return React.createElement(ThemeProvider, {
      theme: LightTheme
    }, React.createElement(Component, props));
  };
};
export var withAll = function withAll(Component) {
  return React.createElement(StyletronProvider, {
    value: engine
  }, React.createElement(ThemeProvider, {
    theme: LightTheme
  }, Component()));
};