"use strict";

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

require("./czi-custom-button.css");

var React = _interopRequireWildcard(require("react"));

require("./custom-dropdown.css");

var _UICommand = _interopRequireDefault(require("./UICommand"));

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

function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }

function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }

class CustomStyleSubMenu extends React.PureComponent {
  constructor() {
    super(...arguments);

    _defineProperty(this, "props", void 0);
  }

  render() {
    const {
      command
    } = this.props;
    return /*#__PURE__*/React.createElement("div", {
      className: "dropdown-content",
      id: "mo-submenu"
    }, /*#__PURE__*/React.createElement("a", {
      onClick: this.onButtonClick.bind(this, {
        type: 'modify',
        command: command
      })
    }, "Modify Style.."), /*#__PURE__*/React.createElement("a", {
      onClick: this.onButtonClick.bind(this, {
        type: 'rename',
        command: command
      })
    }, "Rename Style.."), /*#__PURE__*/React.createElement("a", {
      onClick: this.onButtonClick.bind(this, {
        type: 'remove',
        command: command
      })
    }, "Remove Style.."));
  } //handles the option button click, close the popup with selected values


  onButtonClick(val) {
    this.props.close(val);
  }

}

var _default = CustomStyleSubMenu;
exports.default = _default;