"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "noncontiguousScrollStrategy", {
    enumerable: true,
    get: function() {
        return noncontiguousScrollStrategy;
    }
});
const _utils = require("../utils");
function noncontiguousScrollStrategy(hot) {
    return (cellCoords)=>{
        const scrollTargetCalc = (0, _utils.createScrollTargetCalculator)(hot);
        const targetScroll = {
            row: scrollTargetCalc.getComputedRowTarget(cellCoords),
            col: scrollTargetCalc.getComputedColumnTarget(cellCoords)
        };
        hot.scrollViewportTo(targetScroll, ()=>{
            const { row, col } = targetScroll;
            (0, _utils.scrollWindowToCell)(hot.getCell(row, col, true));
        });
    };
}
