const require_runtime = require("../../_virtual/_rolldown/runtime.js");
const require_index = require("./form/index.js");
const require_const = require("./const.js");
let react = require("react");
react = require_runtime.__toESM(react);
let antd = require("antd");
let _pisell_utils = require("@pisell/utils");
//#region src/components/eftpos/device.tsx
const Device = (props) => {
	const { onSave, children, formItemList } = props;
	const initialValues = require_const.getDefaultValue(formItemList);
	return /* @__PURE__ */ react.default.createElement(react.default.Fragment, null, (props === null || props === void 0 ? void 0 : props.type) === require_const.Eftpos.MX51 && /* @__PURE__ */ react.default.createElement("div", {
		className: "pisell-lowcode__pos-device-pair-text",
		style: {
			display: "flex",
			flexDirection: "column"
		}
	}, /* @__PURE__ */ react.default.createElement("span", null, "1. On the terminal: Go to \"Manage POS pairing\" and create a new POS pairing."), /* @__PURE__ */ react.default.createElement("span", null, "2. On the terminal: Select \"Simple Cloud Integration\"."), /* @__PURE__ */ react.default.createElement("span", null, "3. Enter the pairing code provided from the terminal"), /* @__PURE__ */ react.default.createElement("span", null, "4. Create a pairing nickname for the terminal to identify."), /* @__PURE__ */ react.default.createElement("span", null, "5. Tap \"Pair\" to initiate the pairing on both devices.")), /* @__PURE__ */ react.default.createElement(antd.Form, {
		layout: "vertical",
		onFinish: onSave,
		initialValues,
		className: "pisell-lowcode__pos-device"
	}, /* @__PURE__ */ react.default.createElement("div", { style: {
		flex: 1,
		overflow: "auto",
		padding: "0 0 60px 0"
	} }, /* @__PURE__ */ react.default.createElement(require_index.default, { formItemList }), children), /* @__PURE__ */ react.default.createElement(antd.Form.Item, { className: "pisell-lowcode__pos-device-btn" }, /* @__PURE__ */ react.default.createElement(antd.Button, {
		htmlType: "submit",
		block: true,
		style: { height: "48px" }
	}, (props === null || props === void 0 ? void 0 : props.status) === "edit" ? _pisell_utils.locales.getText("page.eftpos.text.save") : _pisell_utils.locales.getText("page.eftpos.text.pair")))));
};
//#endregion
exports.default = Device;
