import { jsx as _jsx } from "react/jsx-runtime";
import { useUserSession } from "@vertesia/ui/session";
import { useMemo } from "react";
import { ObjectTypeSearch, ObjectTypeSearchContext } from "./ObjectTypeSearchContext";
export function ObjectTypeSearchProvider({ children, limit, name, chunkable: chunkable }) {
    const { store } = useUserSession();
    const search = useMemo(() => {
        const search = new ObjectTypeSearch(store, limit);
        search.query.name = name;
        search.query.chunkable = chunkable;
        return search;
    }, [limit]);
    return (_jsx(ObjectTypeSearchContext.Provider, { value: search, children: children }));
}
//# sourceMappingURL=ObjectTypeSearchProvider.js.map