"use client";
import { useReadonlySet } from "../useReadonlySet.js";
/**
 * @see {@link https://react-md.dev/components/tree | Tree Demos}
 * @since 6.0.0 Renamed from `useTreeItemExpansion` and uses a Set
 * instead of a list to increase performance.
 */ export function useTreeExpansion(defaultExpandedIds) {
    const { value, setValue, toggleValue } = useReadonlySet({
        defaultValue: defaultExpandedIds
    });
    return {
        expandedIds: value,
        toggleTreeItemExpansion: toggleValue,
        expandMultipleTreeItems: setValue
    };
}

//# sourceMappingURL=useTreeExpansion.js.map