"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;

var _react = _interopRequireDefault(require("react"));

require("./index.css");

function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }

var preCls = 'titaui-nav';

var Nav = function Nav(_ref) {
  var dataList = _ref.dataList,
      className = _ref.className,
      onSelect = _ref.onSelect;
  return /*#__PURE__*/_react["default"].createElement("div", {
    className: "".concat(preCls, " ").concat(className)
  }, dataList.map(function (nav, i) {
    return /*#__PURE__*/_react["default"].createElement("p", {
      className: "".concat(preCls, "_item"),
      onClick: onSelect === null || onSelect === void 0 ? void 0 : onSelect.bind(null, i, nav)
    }, nav.label);
  }));
};

var _default = Nav;
exports["default"] = _default;