const require_runtime = require("../../../_virtual/_rolldown/runtime.js");
const require_objectWithoutProperties = require("../../../_virtual/_@oxc-project_runtime@0.122.0/helpers/objectWithoutProperties.js");
const require_const = require("../const.js");
const require_index = require("../store/index.js");
const require_config = require("./config.js");
let react = require("react");
react = require_runtime.__toESM(react);
//#region src/components/eftposPay/payo/index.tsx
const _excluded = ["step", "steps"];
var payo_default = ({ api, onChange, children }) => {
	const _useContextData = require_index.useContextData(), { step, steps } = _useContextData, data = require_objectWithoutProperties._objectWithoutProperties(_useContextData, _excluded);
	return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, /* @__PURE__ */ react.default.createElement("div", { className: "pisell-lowcode__eft-pay-body " }, steps.map((item, idx) => {
		let Comm;
		if (idx === 0) Comm = require_config.POS;
		if (!Comm) throw new Error("no comm");
		if (step >= idx) return /* @__PURE__ */ react.default.createElement(Comm, {
			key: `${data.key}-${item.key}-${idx}`,
			api,
			onChange
		});
	}), children), data.status !== require_const.StatusEnum.Success ? /* @__PURE__ */ react.default.createElement(require_config.Action, { onChange }) : null);
};
//#endregion
exports.default = payo_default;
