"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var tslib_1 = require("tslib");
var React = (0, tslib_1.__importStar)(require("react"));
var PropTypes = (0, tslib_1.__importStar)(require("prop-types"));
var tea_component_1 = require("tea-component");
var classnames_1 = (0, tslib_1.__importDefault)(require("../../utils/classnames"));
function TabsPc(_a) {
    var _b;
    var tabs = _a.tabs, events = _a.events, className = _a.className, panel1 = _a.panel1, panel2 = _a.panel2, panel3 = _a.panel3, panel4 = _a.panel4, panel5 = _a.panel5, panel6 = _a.panel6, panel7 = _a.panel7, panel8 = _a.panel8, panel9 = _a.panel9, panel10 = _a.panel10, panel11 = _a.panel11, panel12 = _a.panel12, panel13 = _a.panel13, panel14 = _a.panel14, panel15 = _a.panel15, panel16 = _a.panel16, panel17 = _a.panel17, panel18 = _a.panel18, panel19 = _a.panel19, panel20 = _a.panel20, style = _a.style;
    var cachePanel = {
        panel1: panel1,
        panel2: panel2,
        panel3: panel3,
        panel4: panel4,
        panel5: panel5,
        panel6: panel6,
        panel7: panel7,
        panel8: panel8,
        panel9: panel9,
        panel10: panel10,
        panel11: panel11,
        panel12: panel12,
        panel13: panel13,
        panel14: panel14,
        panel15: panel15,
        panel16: panel16,
        panel17: panel17,
        panel18: panel18,
        panel19: panel19,
        panel20: panel20
    };
    var _tabs = Array.isArray(tabs) && tabs.length && tabs.map(function (item, index) {
        var _a;
        return {
            id: (_a = item.name) !== null && _a !== void 0 ? _a : index,
            label: item.title
        };
    });
    var onActive = function (e) {
        events && events.onActive(e);
    };
    return (React.createElement(tea_component_1.Tabs, { style: style, tabs: _tabs, onActive: onActive, className: (0, classnames_1.default)("weda-tabs_pc", (_b = {},
            _b[className] = className,
            _b)) }, _tabs === null || _tabs === void 0 ? void 0 : _tabs.map(function (item, index) { return (React.createElement(tea_component_1.TabPanel, { key: item.id, id: item.id, label: item.label }, cachePanel["panel" + (index + 1)])); })));
}
exports.default = TabsPc;
TabsPc.propTypes = {
    tabs: PropTypes.array,
    className: PropTypes.string,
    style: PropTypes.object,
    events: PropTypes.objectOf(PropTypes.func),
    panel1: PropTypes.node,
    panel2: PropTypes.node,
    panel3: PropTypes.node,
    panel4: PropTypes.node,
    panel5: PropTypes.node,
    panel6: PropTypes.node,
    panel7: PropTypes.node,
    panel8: PropTypes.node,
    panel9: PropTypes.node,
    panel10: PropTypes.node,
    panel11: PropTypes.node,
    panel12: PropTypes.node,
    panel13: PropTypes.node,
    panel14: PropTypes.node,
    panel15: PropTypes.node,
    panel16: PropTypes.node,
    panel17: PropTypes.node,
    panel18: PropTypes.node,
    panel19: PropTypes.node,
    panel20: PropTypes.node,
};
//# sourceMappingURL=tabsPc.js.map