"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.VariableList = void 0;
var tslib_1 = require("tslib");
var react_1 = (0, tslib_1.__importDefault)(require("react"));
var GroupedSelection_1 = (0, tslib_1.__importDefault)(require("../GroupedSelection"));
var Tabs_1 = tslib_1.__importStar(require("../Tabs"));
var TreeSelection_1 = (0, tslib_1.__importDefault)(require("../TreeSelection"));
function VariableList(_a) {
    var list = _a.data, className = _a.className, selectMode = _a.selectMode, onSelect = _a.onSelect;
    return (react_1.default.createElement("div", { className: className }, selectMode === 'tabs' ? (react_1.default.createElement(Tabs_1.default, { tabsMode: "radio" }, list.map(function (item, index) { return (react_1.default.createElement(Tabs_1.Tab, { eventKey: index, key: index, title: item.label },
        react_1.default.createElement(VariableList, { selectMode: item.selectMode, data: item.children, onSelect: onSelect }))); }))) : selectMode === 'tree' ? (react_1.default.createElement(TreeSelection_1.default, { multiple: false, options: list, onChange: function (item) { return onSelect === null || onSelect === void 0 ? void 0 : onSelect(item); } })) : (react_1.default.createElement(GroupedSelection_1.default, { multiple: false, options: list, onChange: function (item) { return onSelect === null || onSelect === void 0 ? void 0 : onSelect(item); } }))));
}
exports.VariableList = VariableList;
//# sourceMappingURL=./components/formula/VariableList.js.map
