import "choerodon-ui/lib/form/style";
import _Form from "choerodon-ui/lib/form";
import "choerodon-ui/lib/input/style";
import _Input from "choerodon-ui/lib/input";

/**
 * @author ale0720@163.com
 * @date 2019-05-30 15:37
 */
import React, { Fragment } from 'react';
import { FormattedMessage } from 'react-intl';
var TextArea = _Input.TextArea;
var FormItem = _Form.Item;
var formItemLayout = {
  labelCol: {
    xs: {
      span: 24
    },
    sm: {
      span: 100
    }
  },
  wrapperCol: {
    xs: {
      span: 24
    },
    sm: {
      span: 26
    }
  }
};
export function CertTextarea(propsForm, formatMessage) {
  var initData = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(FormItem, Object.assign({}, formItemLayout, {
    label: /*#__PURE__*/React.createElement(FormattedMessage, {
      id: "certificate.cert.content"
    })
  }), propsForm.getFieldDecorator('certValue', {
    rules: [{
      required: true,
      message: formatMessage({
        id: 'required'
      })
    }],
    initialValue: initData.certValue || ''
  })( /*#__PURE__*/React.createElement(TextArea, {
    autosize: {
      minRows: 2
    },
    label: /*#__PURE__*/React.createElement(FormattedMessage, {
      id: "certificate.cert.content"
    })
  }))), /*#__PURE__*/React.createElement(FormItem, Object.assign({}, formItemLayout, {
    label: /*#__PURE__*/React.createElement(FormattedMessage, {
      id: "certificate.key.content"
    })
  }), propsForm.getFieldDecorator('keyValue', {
    rules: [{
      required: true,
      message: formatMessage({
        id: 'required'
      })
    }],
    initialValue: initData.keyValue || ''
  })( /*#__PURE__*/React.createElement(TextArea, {
    autosize: {
      minRows: 2
    },
    label: /*#__PURE__*/React.createElement(FormattedMessage, {
      id: "certificate.key.content"
    })
  }))));
}