"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _propTypes = _interopRequireDefault(require("prop-types"));

var _react = _interopRequireDefault(require("react"));

var _classnames = _interopRequireDefault(require("classnames"));

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var ToolbarItemContents = function ToolbarItemContents(props) {
  return _react["default"].createElement("div", {
    className: "flex flex-align--center editor__select-size__text"
  }, props.icon && _react["default"].createElement("svg", {
    className: "lego-icon push--right vertical-align--middle"
  }, _react["default"].createElement("use", {
    xlinkHref: props.icon
  })), _react["default"].createElement("div", {
    className: (0, _classnames["default"])({
      "line--tight": props.isDropdown
    })
  }, props.title && _react["default"].createElement("div", {
    className: "editor__select-size__value"
  }, props.title), _react["default"].createElement("span", null, props.label)), props.isDropdown && _react["default"].createElement("span", {
    className: "lego-arrow-inline--down push--left"
  }));
};

ToolbarItemContents.propTypes = {
  icon: _propTypes["default"].string,
  isDropdown: _propTypes["default"].bool,
  label: _propTypes["default"].oneOfType([_propTypes["default"].string.isRequired, _propTypes["default"].node.isRequired]).isRequired,
  title: _propTypes["default"].string
};
var _default = ToolbarItemContents;
exports["default"] = _default;