import CustomFormItem from "./form/index.js";
import { getDefaultValue } from "./const.js";
import React from "react";
import { Button, Form, Typography } from "antd";
import { locales } from "@pisell/utils";
//#region src/components/eftpos/pos.tsx
const { Title } = Typography;
const PosForm = ({ onSave, formItemList }) => {
	const initialValues = getDefaultValue(formItemList);
	return /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__pos-form-box" }, /* @__PURE__ */ React.createElement(Title, {
		level: 4,
		className: "pisell-lowcode__pos-title"
	}, locales.getText("page.eftpos.text.setting")), /* @__PURE__ */ React.createElement(Form, {
		layout: "vertical",
		onFinish: onSave,
		initialValues,
		className: "pisell-lowcode__pos-form",
		key: formItemList
	}, /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__pos-form-content" }, /* @__PURE__ */ React.createElement(CustomFormItem, { formItemList })), /* @__PURE__ */ React.createElement("div", { className: "pisell-lowcode__pos-form-btn" }, /* @__PURE__ */ React.createElement(Form.Item, null, /* @__PURE__ */ React.createElement(Button, {
		htmlType: "submit",
		block: true,
		style: { height: "48px" }
	}, locales.getText("page.eftpos.text.save"))))));
};
//#endregion
export { PosForm as default };
