"use strict";
/**
 * @desc 配置容器
 * @author denghuan
 */
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfigProvider = void 0;
const react_1 = __importDefault(require("react"));
const antd_1 = require("antd");
const styled_components_1 = require("styled-components");
const zh_CN_1 = __importDefault(require("antd/es/locale/zh_CN"));
const default_1 = require("../styles/themes/default");
// TODO 移到对应组件中
const components_1 = __importDefault(require("../styles/components"));
const style_1 = __importDefault(require("../jx-table/style"));
function ConfigProvider(props) {
    const { children, theme } = props;
    const newTheme = { ...default_1.THEME_DARK, ...theme };
    return (react_1.default.createElement(antd_1.ConfigProvider, { locale: zh_CN_1.default, ...props },
        react_1.default.createElement(styled_components_1.ThemeProvider, { theme: newTheme },
            react_1.default.createElement(components_1.default, null),
            react_1.default.createElement(style_1.default, null),
            children)));
}
exports.ConfigProvider = ConfigProvider;
