"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault").default;
Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.default = void 0;
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/esm/defineProperty"));
var _react = _interopRequireDefault(require("react"));
require("./style.css");
class MenuItem extends _react.default.Component {
  constructor() {
    super(...arguments);
    (0, _defineProperty2.default)(this, "onClick", e => {
      this.props.onClick(e);
    });
  }
  render() {
    const {
      children,
      itemClass,
      iconClass,
      isChecked
    } = this.props;
    const containerClass = "sf-menu-item ".concat(itemClass || '');
    const itemIconClass = "menu-item-icon ".concat(iconClass || '');
    return /*#__PURE__*/_react.default.createElement("span", {
      className: containerClass,
      onClick: this.onClick
    }, /*#__PURE__*/_react.default.createElement("span", {
      className: itemIconClass
    }), /*#__PURE__*/_react.default.createElement("span", {
      className: "menu-item-name"
    }, children), isChecked && /*#__PURE__*/_react.default.createElement("span", {
      className: "mdfont md-check-mark"
    }));
  }
}
var _default = exports.default = MenuItem;