import _Dialog from "@alifd/next/es/dialog";
import _Progress from "@alifd/next/es/progress";
import _inheritsLoose from "@babel/runtime/helpers/inheritsLoose";
import React, { Component } from 'react';
import style from "./index.module.scss";
// import cosUpload from '@/module/axios/cosUpload'
var tpl2 = /*#__PURE__*/function (_Component) {
  _inheritsLoose(tpl2, _Component);
  function tpl2() {
    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 = tpl2.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()
    // }

    // style={{
    //         background: 'linear-gradient(180deg, transparent, #E1C491)',
    //         borderRadius: '.5em',
    //         position: 'relative',
    //         overflow: 'hidden',
    //         // padding: '.5em',
    //         maxWidth: '420px',
    //         display: 'flex',
    //         margin: '0 auto',
    //         border: '1px solid #f6eddd'
    //     }
    // }
    return /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'flex',
        overflow: 'hidden',
        margin: '0 auto',
        position: 'relative',
        background: "url('https://img.maimairen.com/upload/img-text-tpl2/2022/09/21/acc4c1392c3089513af48fcdedbf5f15.png') no-repeat",
        backgroundSize: 'cover',
        maxWidth: '420px'
      }
    }, /*#__PURE__*/React.createElement(_Dialog, {
      title: "\u6587\u4EF6\u4E0A\u4F20\u4E2D...",
      visible: this.state.upload.isLoadding,
      footer: /*#__PURE__*/React.createElement("div", null),
      closeMode: [],
      className: style.uploading
    }, /*#__PURE__*/React.createElement(_Progress, {
      percent: this.state.upload.progress,
      shape: "circle"
    })), /*#__PURE__*/React.createElement("div", {
      style: {
        width: '32%',
        margin: '8% 0 0 10px'
        // background: `url(${avatar}) center top/cover`
      }
      // onClick={ev => upload(ev)}
    }, /*#__PURE__*/React.createElement("img", {
      src: avatar,
      style: {
        maxWidth: '100%',
        verticalAlign: 'middle'
      }
    })), /*#__PURE__*/React.createElement("div", {
      style: {
        width: '68%',
        paddingBottom: '20px',
        paddingLeft: '10px'
      }
    }, /*#__PURE__*/React.createElement("div", {
      style: {
        fontSize: '26px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#222222',
        marginTop: '20px'
      }
    }, "\u4E07\u743C"), /*#__PURE__*/React.createElement("div", {
      style: {
        background: '#EDDBBC',
        fontSize: '14px',
        fontFamily: 'MiSans',
        fontWeight: '500',
        display: 'inline-block',
        color: '#755C2F',
        padding: '6px 10px',
        margin: '10px 0',
        borderRadius: '6px'
      }
    }, "\u535A\u65F6\u6052\u751F\u533B\u7597ETF\u57FA\u91D1\u7ECF\u7406"), /*#__PURE__*/React.createElement("div", {
      style: {
        fontSize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#755C2F',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#C7B08E',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "27\u5E74\u8BC1\u5238\u4ECE\u4E1A\u7ECF\u5386"), /*#__PURE__*/React.createElement("div", {
      style: {
        fontSize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#755C2F',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#C7B08E',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "\u6DF1\u8015\u5883\u5916\u5E02\u573A\uFF0C\u5173\u6CE8\u65B0\u5174\u4EA7\u4E1A"), /*#__PURE__*/React.createElement("div", {
      style: {
        fontSize: '14px',
        fontFamily: 'MiSans',
        fontWeight: 'bolder',
        color: '#755C2F',
        lineHeight: '1.5em'
      }
    }, /*#__PURE__*/React.createElement("div", {
      style: {
        display: 'inline-block',
        width: '0.5em',
        height: '0.5em',
        marginRight: '10px',
        background: '#C7B08E',
        borderRadius: '50%',
        lineHeight: '1.5em',
        verticalAlign: 'middle'
      }
    }), "\u64C5\u957F\u901A\u8FC7\u91CF\u5316\u7B56\u7565\u7D27\u5BC6\u8DDF\u8E2A\u6307\u6570")));
  };
  return tpl2;
}(Component);
export { tpl2 as default };