"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TreeLikeList = void 0;
const jsx_runtime_1 = require("react/jsx-runtime");
const styles_1 = require("./styles");
const TreeItem_1 = require("./TreeItem");
const useLogic_1 = require("./useLogic");
const INITIAL_LEVEL = 0;
const TreeLikeList = (props) => {
    const { listProps, itemProps } = (0, useLogic_1.useLogic)(props);
    const { data, className, expandedLevel = 10, disabledItems, ...restProps } = props;
    return ((0, jsx_runtime_1.jsx)(styles_1.List, { className: className, ...listProps, children: data.map((item) => ((0, jsx_runtime_1.jsx)(TreeItem_1.TreeItem, { item: item, level: INITIAL_LEVEL, expandedLevel: expandedLevel, ...itemProps, ...restProps }, item.id))) }));
};
exports.TreeLikeList = TreeLikeList;
