const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_context = require("./context.js");
const require_useResponsive = require("../../hooks/useResponsive.js");
const require_index = require("../pisellModal/components/functions/index.js");
const require_useEngineContext = require("../../hooks/useEngineContext.js");
const require_index$1 = require("../pisellMessage/index.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
//#region src/components/pisell-config-provider/index.tsx
const platformMap = {
	phone: "h5",
	pc: "pc",
	ipad: "ipad"
};
const PisellConfigProvider = (props) => {
	var _context$appHelper;
	const { children, platform: propsPlatform, symbol: propsSymbol, locale } = props;
	const platform = require_useResponsive.default();
	const { getSymbolic } = ((_context$appHelper = require_useEngineContext.default().appHelper) === null || _context$appHelper === void 0 ? void 0 : _context$appHelper.utils) || {};
	const config = {
		platform: propsPlatform || platformMap[platform],
		symbol: propsSymbol || (getSymbolic === null || getSymbolic === void 0 ? void 0 : getSymbolic()) || "",
		locale: locale || "en",
		getSymbolic
	};
	const staticFunction = antd.App.useApp();
	require_index$1.setMessage(staticFunction.message);
	require_index.setModal(staticFunction.modal);
	require_context.globalConfig.setConfig(config);
	return /* @__PURE__ */ react.default.createElement(require_context.default.Provider, { value: config }, children);
};
//#endregion
exports.default = PisellConfigProvider;
