"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
Object.defineProperty(exports, "countListItemsInSelection", {
  enumerable: true,
  get: function get() {
    return _countListItemsInSelection.countListItemsInSelection;
  }
});
exports.getCommonListAnalyticsAttributes = void 0;
var _countListItemsInSelection = require("./countListItemsInSelection");
var _selection = require("./selection");
var getCommonListAnalyticsAttributes = exports.getCommonListAnalyticsAttributes = function getCommonListAnalyticsAttributes(tr) {
  var _tr$selection = tr.selection,
    $from = _tr$selection.$from,
    $to = _tr$selection.$to;
  var fromAttrs = (0, _selection.getListItemAttributes)($from);
  var toAttrs = (0, _selection.getListItemAttributes)($to);
  return {
    itemIndexAtSelectionStart: fromAttrs.itemIndex,
    itemIndexAtSelectionEnd: toAttrs.itemIndex,
    indentLevelAtSelectionStart: fromAttrs.indentLevel,
    indentLevelAtSelectionEnd: toAttrs.indentLevel,
    itemsInSelection: (0, _countListItemsInSelection.countListItemsInSelection)(tr)
  };
};
// eslint-disable-next-line @atlaskit/editor/no-re-export