import _ConfigProvider from 'antd/lib/config-provider';
import _Tree from 'antd/lib/tree';
import _defineProperty from '@babel/runtime/helpers/defineProperty';
import _objectWithoutProperties from '@babel/runtime/helpers/objectWithoutProperties';
import 'react';
import classnames from 'classnames';
import { useTranslation } from 'react-i18next';
import { ANTD_LOCALE } from './constants.js';
import { A as ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES } from './index-QWVp_Xt6.js';
import Down from '@bigbinary/neeto-icons/Down';
import Right from '@bigbinary/neeto-icons/Right';
import { jsx } from 'react/jsx-runtime';
import 'antd/locale/de_DE';
import 'antd/locale/en_US';
import 'antd/locale/es_ES';
import 'antd/locale/fr_FR';
import 'antd/locale/nl_NL';
import 'antd/locale/pl_PL';
import 'antd/locale/pt_PT';
import '@babel/runtime/helpers/slicedToArray';
import '@babel/runtime/helpers/classCallCheck';
import '@babel/runtime/helpers/createClass';
import '@bigbinary/neeto-cist';
import 'qs';
import 'ramda';
import './en-Dmu3B4Vs.js';
import './index-DyUNP5G9.js';
import '@babel/runtime/helpers/toConsumableArray';
import 'dayjs';
import 'dayjs/plugin/localeData';
import 'dayjs/plugin/utc';
import 'dayjs/plugin/weekday';
import 'dayjs/plugin/weekOfYear';
import 'i18next';

var SwitcherIcon = function SwitcherIcon(_ref) {
  var expanded = _ref.expanded;
  return expanded ? /*#__PURE__*/jsx(Down, {
    className: "neeto-ui-relative",
    size: 16
  }) : /*#__PURE__*/jsx(Right, {
    className: "neeto-ui-relative",
    size: 16
  });
};

var _excluded = ["componentToken"];
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), true).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
var Tree = function Tree(_ref) {
  var componentToken = _ref.componentToken,
    props = _objectWithoutProperties(_ref, _excluded);
  var _useTranslation = useTranslation(),
    i18n = _useTranslation.i18n;
  return /*#__PURE__*/jsx(_ConfigProvider, {
    locale: ANTD_LOCALE[i18n.language || "en"],
    theme: {
      token: _objectSpread({}, ANT_DESIGN_GLOBAL_TOKEN_OVERRIDES),
      components: {
        Tree: _objectSpread({
          directoryNodeSelectedBg: "rgb(var(--neeto-ui-primary-500))",
          directoryNodeSelectedColor: "rgb(var(--neeto-ui-white))",
          nodeHoverBg: "rgb(var(--neeto-ui-gray-100))",
          nodeSelectedBg: "rgb(var(--neeto-ui-primary-100))"
        }, componentToken)
      }
    },
    children: /*#__PURE__*/jsx(_Tree, _objectSpread(_objectSpread({
      switcherIcon: SwitcherIcon
    }, props), {}, {
      className: classnames("neeto-ui-tree", props.className)
    }))
  });
};

export { Tree as default };
//# sourceMappingURL=Tree.js.map
