"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.usePageWithArrowKeys = void 0;
exports.usePageWithArrowKeys = function (containerRef, pagingStrategy) {
    var onKeyDown = function (e) {
        if (!containerRef.current)
            return;
        if (e.key === 'ArrowLeft') {
            pagingStrategy.pageLeft(containerRef.current);
        }
        else if (e.key === 'ArrowRight') {
            pagingStrategy.pageRight(containerRef.current);
        }
    };
    return { onKeyDown: onKeyDown };
};
