"use strict";

require("./demo4.css");

var _ = _interopRequireDefault(require(".."));

var _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

var _reactDom = _interopRequireDefault(require("react-dom"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var localeSettings = {
  momentLocale: 'fr-FR',
  CustomizedComponent: {
    helloWorld: 'hello, world'
  }
};

var App = function App(_ref) {
  var children = _ref.children;
  return /*#__PURE__*/_react["default"].createElement(_["default"], {
    prefix: "customized-",
    locale: localeSettings,
    pure: true,
    warning: false
  }, children);
};

App.propTypes = {
  children: _propTypes["default"].node
};

var Child = function Child() {
  return (
    /*#__PURE__*/
    // @ts-ignore
    _react["default"].createElement(_["default"].Consumer, null, function (context) {
      return /*#__PURE__*/_react["default"].createElement("div", {
        className: "context-data"
      }, /*#__PURE__*/_react["default"].createElement("h3", null, "Context's state"), /*#__PURE__*/_react["default"].createElement("pre", null, JSON.stringify(context, undefined, 2)));
    })
  );
};

var Demo = function Demo() {
  return /*#__PURE__*/_react["default"].createElement(App, null, /*#__PURE__*/_react["default"].createElement(Child, null));
};

_reactDom["default"].render( /*#__PURE__*/_react["default"].createElement(Demo, null), document.getElementById('config-provider-demo-4'));