"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
exports.__esModule = true;
exports["default"] = void 0;
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
var _objectWithoutPropertiesLoose2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutPropertiesLoose"));
var _react = _interopRequireDefault(require("react"));
require("./index.scss");
var _childrenNodeHandle = require("../../../src/utils/children-node-handle");
var _excluded = ["dataList", "onClick", "children"];
/**
 * 个人资料
 */

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