"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _dialog = _interopRequireDefault(require("@alifd/next/lib/dialog"));
var _progress = _interopRequireDefault(require("@alifd/next/lib/progress"));
var _inheritsLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/inheritsLoose"));
var _react = _interopRequireWildcard(require("react"));
var _indexModule = _interopRequireDefault(require("./index.module.scss"));
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
var tpl3 = /*#__PURE__*/function (_Component) {
  (0, _inheritsLoose2["default"])(tpl3, _Component);
  function tpl3() {
    var _this;
    for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
      args[_key] = arguments[_key];
    }
    _this = _Component.call.apply(_Component, [this].concat(args)) || this;
    _this.state = {
      avatar: 'https://img.maimairen.com/low-code/components/text-image/service-man.png?imageMogr2/thumbnail/144x173',
      upload: {
        isLoadding: false,
        progress: 0
      }
    };
    return _this;
  }
  var _proto = tpl3.prototype;
  _proto.render = function render() {
    var avatar = this.state.avatar;

    // function upload() {
    //     alert()
    //     debugger
    //     // const _this = this
    //     // const file = document.createElement('input');
    //     // file.type='file'
    //     // file.onchange = ev=>{
    //     //     const succ = cosUpload(ev.target?.files[0], {
    //     //         pathDir: 'serviceAvatar',
    //     //         isDateDir: true,
    //     //         reName: true,
    //     //         onProgress({total, loaded}) {
    //     //             // setUploadStatus({total, loaded})
    //     //             const progress = (loaded / total * 100).toFixed(2) - 0
    //     //             if(!progress) return
    //     //             this.setState({
    //     //                 upload:{
    //     //                     isLoadding: !(progress >= 100),
    //     //                     progress
    //     //                 }
    //     //             })
    //     //         }
    //     //     })
    //     //     succ.then(({code, data, msg}) => {
    //     //         if (code === '0000') {
    //     //             _this.state.avatar = data.ossPath
    //     //             // insetContent(`<img src="${data.ossPath}" alt="${data.imgName}">`)
    //     //         } else {
    //     //             Message.error(msg);
    //     //         }
    //     //     })
    //     // }
    //     // file.click()
    // }

    return /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        background: '#ffffff',
        borderRadius: '.5em',
        position: 'relative',
        overflow: 'hidden',
        // padding: '.5em',
        maxWidth: '420px',
        display: 'flex',
        margin: '0 auto'
      }
    }, /*#__PURE__*/_react["default"].createElement(_dialog["default"], {
      title: "\u6587\u4EF6\u4E0A\u4F20\u4E2D...",
      visible: this.state.upload.isLoadding,
      footer: /*#__PURE__*/_react["default"].createElement("div", null),
      closeMode: [],
      className: _indexModule["default"].uploading
    }, /*#__PURE__*/_react["default"].createElement(_progress["default"], {
      percent: this.state.upload.progress,
      shape: "circle"
    })), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        width: '100%',
        paddingLeft: '10px'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        display: 'flex',
        justifyContent: 'space-between',
        paddingTop: '30px',
        overflow: 'hidden',
        position: 'relative'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        width: '100%'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        display: 'flex',
        width: '100%',
        alignItems: 'flex-end',
        background: 'linear-gradient(90deg, #F8D4C8 0%, #FEF0E7 100%)',
        borderTopLeftRadius: '4px',
        borderTopRightRadius: '4px',
        padding: '1% 0 3.6% 0'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        flex: '1',
        fontSize: '26px',
        fontFamily: 'MiSans',
        fontWeight: '600',
        color: '#885A36',
        paddingLeft: '4%'
      }
    }, "\u4E07\u743C"), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        flex: '4.6',
        fontSize: '14px',
        fontFamily: 'MiSans',
        fontWeight: '500',
        color: '#83756B'
      }
    }, "\u535A\u65F6\u6052\u751F\u533B\u7597ETF\u57FA\u91D1\u7ECF\u7406")), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        padding: '4% 0 6% 4%',
        marginTop: '-2%',
        background: 'linear-gradient(90deg, #6997ff 0%, #4e70ee 100%)',
        // box-shadow: 0px 0px 36px 0px rgba(75, 61, 56, 0.26),
        // 0px 1px 2px 0px rgba(255, 255, 255, 0.54);
        borderTopLeftRadius: '8px',
        borderTopRightRadius: '8px'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        fontsize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#FFFFFF',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#FFFFFF',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "27\u5E74\u8BC1\u5238\u4ECE\u4E1A\u7ECF\u5386"), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        fontsize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#FFFFFF',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#FFFFFF',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "\u6DF1\u8015\u5883\u5916\u5E02\u573A\uFF0C\u5173\u6CE8\u65B0\u5174\u4EA7\u4E1A"), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        fontsize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#FFFFFF',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#FFFFFF',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "\u64C5\u957F\u901A\u8FC7\u91CF\u5316\u7B56\u7565\u7D27\u5BC6\u8DDF\u8E2A\u6307\u6570"))), /*#__PURE__*/_react["default"].createElement("div", {
      style: {
        width: '32%',
        position: 'absolute',
        top: '6%',
        right: '0'
      }
      // onClick={ev => upload(ev)}
    }, /*#__PURE__*/_react["default"].createElement("img", {
      src: avatar,
      style: {
        maxWidth: '100%',
        verticalAlign: 'middle'
      }
    })))));
  };
  return tpl3;
}(_react.Component);
exports["default"] = tpl3;