export var command = {
  name: 'extendCellsSelectionToMostTop',
  callback: function callback(hot) {
    var selection = hot.selection,
      rowIndexMapper = hot.rowIndexMapper;
    var _hot$getSelectedRange = hot.getSelectedRangeLast(),
      highlight = _hot$getSelectedRange.highlight,
      from = _hot$getSelectedRange.from,
      to = _hot$getSelectedRange.to;
    if (highlight.isCell() || highlight.isHeader() && hot.selection.isSelectedByRowHeader()) {
      var row = rowIndexMapper.getNearestNotHiddenIndex(0, 1);
      selection.setRangeStart(from.clone());
      selection.selectedByRowHeader.add(selection.getLayerLevel());
      selection.setRangeEnd(hot._createCellCoords(row, to.col));
    }
  }
};