"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "ConfigConsumer", {
  enumerable: true,
  get: function get() {
    return _components.ConfigConsumer;
  }
});
exports.default = exports.ConfigContext = void 0;

require("antd/es/config-provider/style");

var _configProvider = _interopRequireDefault(require("antd/es/config-provider"));

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

var _zh_CN = _interopRequireDefault(require("antd/es/locale/zh_CN"));

var _components = require("@parallel-line/common/es/components");

var _moment = _interopRequireDefault(require("moment"));

require("moment/locale/zh-cn");

var _excluded = ["antProviderProps"];

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

function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }

function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }

_moment.default.locale('zh-cn');

var ConfigContext = _components.ConfigProvider.Context;
exports.ConfigContext = ConfigContext;
var SizeContext = _components.ConfigProvider.SizeContext;

var InlineConfigProvider = function InlineConfigProvider(_ref) {
  var antProviderProps = _ref.antProviderProps,
      props = _objectWithoutProperties(_ref, _excluded);

  return /*#__PURE__*/_react.default.createElement(_configProvider.default, Object.assign({
    locale: _zh_CN.default
  }, antProviderProps), /*#__PURE__*/_react.default.createElement(_components.ConfigProvider, Object.assign({}, props)));
};

InlineConfigProvider.defaultProps = {
  prefixCls: 'pxx'
};
InlineConfigProvider.Context = ConfigContext;
InlineConfigProvider.SizeContext = SizeContext;
var _default = InlineConfigProvider;
exports.default = _default;