"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InfiniteTreeListContextProvider = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const useSet_1 = require("../../../useSet");
const InfiniteTreeListContext_1 = require("../InfiniteTreeListContext");
const InfiniteTreeListContextProvider = ({ children, itemSkeleton, }) => {
    const [disabledIdList, disabledIdListActions] = (0, useSet_1.useSet)(new Set());
    const setDisabled = (itemId, disabled) => {
        disabled
            ? disabledIdListActions.add(itemId)
            : disabledIdListActions.remove(itemId);
    };
    return ((0, jsx_runtime_1.jsx)(InfiniteTreeListContext_1.InfiniteTreeListContext.Provider, { value: {
            itemSkeleton,
            disabledIdList,
            setDisabled,
        }, children: children }));
};
exports.InfiniteTreeListContextProvider = InfiniteTreeListContextProvider;
