"use strict";
var __assign = (this && this.__assign) || function () {
    __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
                t[p] = s[p];
        }
        return t;
    };
    return __assign.apply(this, arguments);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.useSingleCarousel = void 0;
var useKeepTileInView_1 = require("../scroll/useKeepTileInView");
var useSelectOnFocus_1 = require("../select/useSelectOnFocus");
var useSelectWithArrowKeys_1 = require("../select/useSelectWithArrowKeys");
exports.useSingleCarousel = function (containerRef, props) {
    useKeepTileInView_1.useKeepSelectedTileInView(containerRef, props.selected);
    var focusProps = useSelectOnFocus_1.useSelectOnFocus(containerRef, props.onSelect);
    var keyProps = useSelectWithArrowKeys_1.useSelectWithArrowKeys(containerRef, props);
    return {
        props: __assign(__assign({}, focusProps), keyProps)
    };
};
