import React from 'react';
import { Form,Button} from 'antd';
import './index.less';


export default function FormContent(props) {
  const { onOk, className = '',noticeExtView,form,okText = '确认', cancelText = '取消',refs, onCancel, children, disabled = false, footerType = 1, wrapStyle, ...params } = props;
  return (
    <Form {...params} form={form} ref={refs} className={`lm-c-drawer-with-footer-content ${className}`}>
      <div style={wrapStyle} className="content-part">
        {children}
      </div>
      <div className="footer-part">
        <div className="notice-ext-view">{noticeExtView}</div>
        <div className="footer-action">
          {footerType === 1 && (
            <Button style={{ marginRight: 10 }} onClick={onCancel}>
              {cancelText}
            </Button>
          )}
          <Button disabled={disabled} onClick={onOk} type="primary">
            {okText}
          </Button>
        </div>
      </div>
    </Form>
  );
}
