import React, { useMemo } from 'react';
import { iconMap } from "./../AppearanceEdit/constants";
import "./index.less";
var AppearanceShow = function AppearanceShow(props) {
  var color = props.color,
    icon = props.icon,
    _props$size = props.size,
    size = _props$size === void 0 ? 20 : _props$size,
    _props$fontSize = props.fontSize,
    fontSize = _props$fontSize === void 0 ? 14 : _props$fontSize,
    name = props.name;
  var Icon = useMemo(function () {
    return iconMap[icon];
  }, [icon]);
  return /*#__PURE__*/React.createElement("div", {
    className: "appearance-wrap",
    style: {
      background: color || '#7F56D9',
      height: size,
      width: size,
      fontSize: fontSize
    }
  }, Icon ? /*#__PURE__*/React.createElement(Icon, null) : name === null || name === void 0 ? void 0 : name.slice(0, 2));
};
export default AppearanceShow;