import { _objectSpread2 } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import { _objectWithoutProperties } from "../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js";
import React from "react";
import { ConfigProvider } from "antd";
import dayjs from "dayjs";
import "dayjs/locale/zh-cn";
import zhCN from "antd/es/locale/zh_CN";
import "dayjs/locale/ja";
import "dayjs/locale/pt";
//#region src/components/config-provider/index.tsx
const _excluded = ["locale"];
const ConfigProvider$1 = (props) => {
	const { locale } = props, rest = _objectWithoutProperties(props, _excluded);
	let localeData = locale;
	if (typeof locale === "string") {
		if (locale.toLowerCase() === "zh-cn") {
			dayjs.locale("zh-cn");
			localeData = zhCN;
		} else if (locale.toLowerCase() === "en-us") {
			dayjs.locale("en");
			localeData = void 0;
		} else if (locale.toLowerCase() === "ja") dayjs.locale("ja");
		else if (locale.toLowerCase() === "pt") dayjs.locale("pt");
	}
	return /* @__PURE__ */ React.createElement(ConfigProvider, _objectSpread2({ locale: localeData }, rest));
};
//#endregion
export { ConfigProvider$1 as default };
