text: define(["exports", "../../../@polymer/polymer/polymer-element.js", "../../../@polymer/polymer/lib/utils/render-status.js", "../../../@polymer/paper-button/paper-button.js"], function (_exports, _polymerElement, _renderStatus, _paperButton) {
    "use strict";
  
    Object.defineProperty(_exports, "__esModule", {
      value: true
    });
    _exports.EditableTableEditorInsdel = void 0;
  
    function _templateObject_9c8d8280cf4a11e9b8b15bd4e98e0211() {
      var data = babelHelpers.taggedTemplateLiteral(["\n      <style>\n        :host {\n          display: block;\n        }\n        :host paper-button {\n          display: block;\n          text-transform: none;\n          text-align: left;\n        }\n      </style>\n      <paper-button><slot></slot></paper-button>\n    "]);
  
      _templateObject_9c8d8280cf4a11e9b8b15bd4e98e0211 = function _templateObject_9c8d8280cf4a11e9b8b15bd4e98e0211() {
        return data;
      };
  
      return data;
    }
  
    /**
    `editable-table-editor-insdel`
    
    A button in the editable-table-editor-rowcol menu 
    (editable-table-editor-rowcol.html) that inserts or 
    deletes a row or column .
    
    * @demo demo/index.html
    
    @microcopy - the mental model for this element
    <editable-table-editor-insdel 
      action="insert"               //The action this button performs, as in "insert" or "delete"  
      before                        //If the action is insert, should row or column be inserted before the index? Default is false (after).
      index="1"                     //The index of the row or column where this button is located
      type="Row">                   //The type of menu, as in "Row" or "Column"
      Insert Row Before             //The text of the button
    </editable-table-editor-insdel>
    
    */
    var EditableTableEditorInsdel =
    /*#__PURE__*/
    function (_PolymerElement) {
      babelHelpers.inherits(EditableTableEditorInsdel, _PolymerElement);
  
      function EditableTableEditorInsdel() {
        babelHelpers.classCallCheck(this, EditableTableEditorInsdel);
        return babelHelpers.possibleConstructorReturn(this, babelHelpers.getPrototypeOf(EditableTableEditorInsdel).apply(this, arguments));
      }
  
      babelHelpers.createClass(EditableTableEditorInsdel, [{
        key: "connectedCallback",
        value: function connectedCallback() {
          babelHelpers.get(babelHelpers.getPrototypeOf(EditableTableEditorInsdel.prototype), "connectedCallback", this).call(this);
          (0, _renderStatus.afterNextRender)(this, function () {
            this.addEventListener("click", this._onTap.bind(this));
          });
        }
      }, {
        key: "disconnectedCallback",
        value: function disconnectedCallback() {
          this.removeEventListener("click", this._onTap.bind(this));
          babelHelpers.get(babelHelpers.getPrototypeOf(EditableTableEditorInsdel.prototype), "disconnectedCallback", this).call(this);
        }
      }, {
        key: "_onTap",
  
        /**
         * Handle item tap
         */
        value: function _onTap(e) {
          var action = this.action,
              type = this.type,
              before = this.before,
              index = this.index,
              event = action + "-" + type.toLowerCase();
  
          if (action === "insert" && before && type === "Row") {
            index--;
          } else if (action === "insert" && !before && type !== "Row") {
            index++;
          }
  
          this.dispatchEvent(new CustomEvent(event, {
            bubbles: true,
            cancelable: true,
            composed: true,
            detail: index
          }));
        }
      }], [{
        key: "template",
        get: function get() {
          return (0, _polymerElement.html)(_templateObject_9c8d8280cf4a11e9b8b15bd4e98e0211());
        }
      }, {
        key: "tag",
        get: function get() {
          return "editable-table-editor-insdel";
        }
      }, {
        key: "properties",
        get: function get() {
          return {
            /**
             * The action of the menu item
             */
            action: {
              type: String,
              value: null
            },
  
            /**
             * The index of the row or column
             */
            index: {
              type: Number,
              value: null,
              reflectToAttribute: true
            },
  
            /**
             * If insert, does it insert before? Default is insert after.
             */
            before: {
              type: Boolean,
              value: false,
              reflectToAttribute: true
            },
  
            /**
             * Is it row or column?
             */
            type: {
              type: String,
              value: null
            }
          };
        }
      }]);
      return EditableTableEditorInsdel;
    }(_polymerElement.PolymerElement);
  
    _exports.EditableTableEditorInsdel = EditableTableEditorInsdel;
    window.customElements.define(EditableTableEditorInsdel.tag, EditableTableEditorInsdel);
  });