import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
var _excluded = ["dataList", "onClick", "children"];
import React from 'react';
import "./index.scss";
import { convertChildren } from "../../../src/utils/children-node-handle";

/**
 * 个人资料
 */

var Profile = function Profile(_ref) {
  var dataList = _ref.dataList,
    onClick = _ref.onClick,
    children = _ref.children,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var _otherProps = otherProps || {};
  console.log('dataList', dataList);
  return /*#__PURE__*/React.createElement("div", _extends({
    className: "profile"
  }, _otherProps, {
    onClick: onClick
  }), convertChildren(children, 'image', {
    src: "https://51ymb.com/source/api/upload/" + (dataList === null || dataList === void 0 ? void 0 : dataList.headPath),
    className: 'profile__image'
  }), /*#__PURE__*/React.createElement("div", {
    className: "profile__info"
  }, convertChildren(children, 'userName', {
    children: [dataList === null || dataList === void 0 ? void 0 : dataList.userName],
    className: 'profile__name'
  }), convertChildren(children, 'phone', {
    children: [dataList === null || dataList === void 0 ? void 0 : dataList.phone],
    className: 'profile__phone'
  }), convertChildren(children, 'button', {
    children: ['Edit'],
    onClick: onClick,
    className: 'profile__button'
  })));
};
Profile.displayName = 'Profile';
export default Profile;