import React from 'react';
import { Form, Button } from 'antd';
import { locales } from '@pisell/utils';
import { getDefaultValue } from "./const";
import FormItem from "./form";
var Device = function Device(props) {
  var onSave = props.onSave,
    children = props.children,
    formItemList = props.formItemList;
  var initialValues = getDefaultValue(formItemList);
  return /*#__PURE__*/React.createElement(Form, {
    layout: "vertical",
    onFinish: onSave,
    initialValues: initialValues,
    className: "pisell-lowcode__pos-device"
  }, /*#__PURE__*/React.createElement("div", {
    style: {
      flex: 1,
      overflow: 'auto',
      padding: '0 0 60px 0'
    }
  }, /*#__PURE__*/React.createElement(FormItem, {
    formItemList: formItemList
  }), children), /*#__PURE__*/React.createElement(Form.Item, {
    className: "pisell-lowcode__pos-device-btn"
  }, /*#__PURE__*/React.createElement(Button, {
    htmlType: "submit",
    block: true,
    style: {
      height: '48px'
    }
  }, locales.getText('page.eftpos.text.save'))));
};
export default Device;