import { Form, Button, Typography } from "antd";
import React from "react";
import { getDefaultValue } from "./const";
import { locales } from "@pisell/utils";
import FormItem from "./form";
var Title = Typography.Title;
var PosForm = function PosForm(_ref) {
  var onSave = _ref.onSave,
    formItemList = _ref.formItemList;
  var 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: initialValues,
    className: "pisell-lowcode__pos-form",
    key: formItemList
  }, /*#__PURE__*/React.createElement("div", {
    className: "pisell-lowcode__pos-form-content"
  }, /*#__PURE__*/React.createElement(FormItem, {
    formItemList: 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"))))));
};
export default PosForm;