"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.useWindowScroll = void 0;
const useWindowScroll = () => {
    const focusElement = (element) => {
        var _a, _b;
        // TODO: Support top / bottom etc focus
        window.scrollTo({ top: window.scrollY + ((_b = (_a = element === null || element === void 0 ? void 0 : element.getBoundingClientRect) === null || _a === void 0 ? void 0 : _a.call(element)) === null || _b === void 0 ? void 0 : _b.top) - window.innerHeight / 2, behavior: 'smooth' });
    };
    return {
        focusElement,
    };
};
exports.useWindowScroll = useWindowScroll;
//# sourceMappingURL=ScrollFocusHook.js.map