import { _objectSpread2 } from "../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectSpread2.js";
import locales_default from "./locales.js";
import { useEngineLocale } from "./hooks.js";
import { ToBPayProvider } from "./store/provider.js";
import ToBPayContent from "./components/Content/index.js";
import React, { forwardRef, useImperativeHandle, useRef } from "react";
import { locales } from "@pisell/utils";
//#region src/components/pay/toB/index.tsx
const ToBPay = forwardRef((props, ref) => {
	const toBPayRef = useRef(null);
	const engineLocale = useEngineLocale();
	locales.init(locales_default, engineLocale);
	useImperativeHandle(ref, () => {
		var _toBPayRef$current;
		return { open: (_toBPayRef$current = toBPayRef.current) === null || _toBPayRef$current === void 0 ? void 0 : _toBPayRef$current.open };
	});
	console.log("toBPayProps", props);
	return /* @__PURE__ */ React.createElement(ToBPayProvider, null, /* @__PURE__ */ React.createElement(ToBPayContent, _objectSpread2(_objectSpread2({}, props || {}), {}, { ref: toBPayRef })));
});
//#endregion
export { ToBPay as default };
