import React from "react";
import { css } from "emotion";
import { ElementRoot } from "../../../components/ElementRoot";
var center = /*#__PURE__*/css({
  textAlign: "center"
}, "label:center;");

var Icon = function Icon(_ref) {
  var element = _ref.element;
  var _element$data$compone = element.data.componentSettings,
      icon = _element$data$compone.icon,
      _element$data$compone2 = _element$data$compone.width,
      width = _element$data$compone2 === void 0 ? 50 : _element$data$compone2,
      color = _element$data$compone.color;
  var widthClass = /*#__PURE__*/css({
    fontSize: width,
    color: color
  }, "label:widthClass;");
  return /*#__PURE__*/React.createElement(ElementRoot, {
    element: element
  }, function (_ref2) {
    var getAllClasses = _ref2.getAllClasses,
        elementStyle = _ref2.elementStyle;
    return /*#__PURE__*/React.createElement("span", {
      style: elementStyle,
      className: getAllClasses("webiny-pb-base-page-element-style webiny-pb-page-element-icon", center, widthClass)
    }, icon);
  });
};

export default Icon;
//# sourceMappingURL=Icon.js.map