"use strict";
Object.defineProperty(exports, "__esModule", {
    value: true
});
Object.defineProperty(exports, "useComboboxItems", {
    enumerable: true,
    get: function() {
        return useComboboxItems;
    }
});
const _react = require("react");
const _utils = require("../utils");
const _usePathMaps = require("./usePathMaps");
const useComboboxItems = ({ items, textValue, currentLabel, filter })=>{
    const filteredItems = (0, _react.useMemo)(()=>(0, _utils.filterItems)(items, textValue, currentLabel, filter), [
        currentLabel,
        filter,
        items,
        textValue
    ]);
    const [filteredPathMap, filteredFocusedToValueMap, filteredValueToPathMap] = (0, _usePathMaps.useNavigationMaps)(filteredItems);
    return {
        filteredItems,
        filteredMaps: {
            pathMap: filteredPathMap,
            focusedToValueMap: filteredFocusedToValueMap,
            valueToPathMap: filteredValueToPathMap
        }
    };
};
