function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
export var ATTRIBUTE_BOOKMARK_ID = 'data-bookmark-id';
export var ATTRIBUTE_BOOKMARK_VISIBLE = 'data-bookmark-visible';
function getAttrs(dom) {
  var id = dom.getAttribute(ATTRIBUTE_BOOKMARK_ID);
  var visible = dom.getAttribute(ATTRIBUTE_BOOKMARK_VISIBLE) === 'true';
  return {
    id: id,
    visible: visible
  };
}
var BookmarkNodeSpec = {
  inline: true,
  attrs: {
    id: {
      "default": null
    },
    visible: {
      "default": null
    }
  },
  group: 'inline',
  draggable: true,
  parseDOM: [{
    tag: "a[".concat(ATTRIBUTE_BOOKMARK_ID, "]"),
    getAttrs: getAttrs
  }],
  toDOM: function toDOM(node) {
    var _node$attrs = node.attrs,
      id = _node$attrs.id,
      visible = _node$attrs.visible;
    var attrs = id ? _defineProperty(_defineProperty(_defineProperty({}, ATTRIBUTE_BOOKMARK_ID, id), ATTRIBUTE_BOOKMARK_VISIBLE, visible), "id", id) : {};
    return ['a', attrs];
  }
};
export default BookmarkNodeSpec;
import { bpfrpt_proptype_NodeSpec } from "./Types.js";