define(["exports", "../../../../lit/index.js", "./rich-text-editor-button.js"], function (_exports, _index, _richTextEditorButton) {
  "use strict";

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

  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) { symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); } keys.push.apply(keys, symbols); } return keys; }

  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { babelHelpers.defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }

  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = babelHelpers.getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = babelHelpers.getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return babelHelpers.possibleConstructorReturn(this, result); }; }

  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }

  /**
   * `rich-text-editor-unlink`
   * a link button for rich text editor
   *
   * @customElement
   * @lit-html
   * @lit-element
   * @extends RichTextEditorPromptButtonBehaviors
   * @extends LitElement
   * @element rich-text-editor-unlink
   * @demo ./demo/buttons.html
   */
  var RichTextEditorUnlink = /*#__PURE__*/function (_RichTextEditorButton) {
    babelHelpers.inherits(RichTextEditorUnlink, _RichTextEditorButton);

    var _super = _createSuper(RichTextEditorUnlink);

    function RichTextEditorUnlink() {
      var _this;

      babelHelpers.classCallCheck(this, RichTextEditorUnlink);
      _this = _super.call(this);
      _this.command = "unlink";
      _this.icon = "mdextra:unlink";
      _this.label = "Remove Link";
      _this.tagsList = "a";
      _this.shortcutKeys = "ctrl+k";
      return _this;
    }

    babelHelpers.createClass(RichTextEditorUnlink, [{
      key: "render",
      value: // render function for template
      function render() {
        return babelHelpers.get(babelHelpers.getPrototypeOf(RichTextEditorUnlink.prototype), "render", this).call(this);
      } // properties available to the custom element for data binding

    }, {
      key: "updated",
      value: function updated(changedProperties) {
        var _this2 = this;

        if (babelHelpers.get(babelHelpers.getPrototypeOf(RichTextEditorUnlink.prototype), "updated", this)) babelHelpers.get(babelHelpers.getPrototypeOf(RichTextEditorUnlink.prototype), "updated", this).call(this, changedProperties);
        changedProperties.forEach(function (oldValue, propName) {
          if (propName === "range") if (_this2.commandIsToggled) {
            _this2.setAttribute("disabeld", "disabled");
          } else {
            _this2.removeAttribute("disabeld");
          }
        });
      }
    }], [{
      key: "tag",
      get:
      /**
       * Store the tag name to make it easier to obtain directly.
       */
      function get() {
        return "rich-text-editor-unlink";
      }
    }, {
      key: "properties",
      get: function get() {
        return _objectSpread({}, babelHelpers.get(babelHelpers.getPrototypeOf(RichTextEditorUnlink), "properties", this));
      }
    }]);
    return RichTextEditorUnlink;
  }((0, _richTextEditorButton.RichTextEditorButtonBehaviors)(_index.LitElement));

  _exports.RichTextEditorUnlink = RichTextEditorUnlink;
  window.customElements.define(RichTextEditorUnlink.tag, RichTextEditorUnlink);
});