import { __assign, __extends } from "tslib";
import { jsx as _jsx } from "react/jsx-runtime";
import cn from 'classnames';
import VerticalTab from '../tab/VerticalTab';
import BaseTabsNav from '../base/BaseTabsNav';
import { commonTransformTabData } from '../../utils';
var VerticalTabsNav = (function (_super) {
    __extends(VerticalTabsNav, _super);
    function VerticalTabsNav() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.typeName = 'vertical';
        return _this;
    }
    Object.defineProperty(VerticalTabsNav.prototype, "tabsNavCls", {
        get: function () {
            return cn('zent-tabs-nav', "zent-tabs-nav-type__" + this.typeName);
        },
        enumerable: false,
        configurable: true
    });
    VerticalTabsNav.prototype.transformTabDataList = function (tabDataList) {
        return tabDataList.map(function (tabItem) {
            if ('divide' in tabItem) {
                return tabItem;
            }
            return commonTransformTabData(tabItem, false);
        });
    };
    VerticalTabsNav.prototype.renderTab = function (data, index) {
        if ('divide' in data) {
            return _jsx("div", { className: "zent-tabs-divide", "data-zv": 'v10.0.12' }, "divide-" + index);
        }
        return (_jsx(VerticalTab, __assign({ onSelected: this.onTabSelected }, data, { id: data.key }, { children: data.title }), void 0));
    };
    VerticalTabsNav.prototype.render = function () {
        var maxHeight = this.props.scrollHeight;
        return (_jsx("div", __assign({ className: this.tabsNavCls, "data-zv": 'v10.0.12' }, { children: _jsx("div", __assign({ className: "zent-tabs-nav-content", "data-zv": 'v10.0.12' }, { children: _jsx("div", __assign({ className: "zent-tabs-scroll", style: {
                        maxHeight: maxHeight,
                    }, role: "tablist", "data-zv": 'v10.0.12' }, { children: this.renderTabs() }), void 0) }), void 0) }), void 0));
    };
    return VerticalTabsNav;
}(BaseTabsNav));
export default VerticalTabsNav;
