var __rest = (this && this.__rest) || function (s, e) {
    var t = {};
    for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
        t[p] = s[p];
    if (s != null && typeof Object.getOwnPropertySymbols === "function")
        for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
            if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
                t[p[i]] = s[p[i]];
        }
    return t;
};
/* eslint-disable jsx-a11y/mouse-events-have-key-events */
/** biome-ignore-all lint/a11y/useKeyWithMouseEvents: We know what we are doing */
import React from "react";
import { cl } from "../../../helpers/index.js";
import { useListboxContext } from "../root/Listbox.context.js";
function ListboxOptions(_a) {
    var { children } = _a, rest = __rest(_a, ["children"]);
    const { setVirtuallyFocusedOptionId } = useListboxContext();
    return (React.createElement("div", Object.assign({}, rest, { className: cl(rest.className, "aksel-listbox__options"), role: "listbox", tabIndex: -1, onMouseOver: (event) => {
            const target = event.target;
            const optionEl = target.closest('[role="option"]');
            if (optionEl) {
                setVirtuallyFocusedOptionId((optionEl === null || optionEl === void 0 ? void 0 : optionEl.dataset.id) || "");
            }
        } }), children));
}
export { ListboxOptions };
//# sourceMappingURL=ListboxOptions.js.map