"use strict";

var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");

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

var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));

var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));

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

var _components = require("@alicloudfe/components");

var _classnames = _interopRequireDefault(require("classnames"));

var _theme = _interopRequireDefault(require("../theme"));

var BDesignSelect = function BDesignSelect(props) {
  var className = props.className,
      theme = props.theme,
      _props$size = props.size,
      size = _props$size === void 0 ? 'large' : _props$size,
      _props$hasTick = props.hasTick,
      hasTick = _props$hasTick === void 0 ? false : _props$hasTick,
      rest = (0, _objectWithoutProperties2.default)(props, ["className", "theme", "size", "hasTick"]);
  return /*#__PURE__*/_react.default.createElement(_theme.default, {
    theme: theme
  }, function (theme) {
    return /*#__PURE__*/_react.default.createElement(_components.Select, (0, _extends2.default)({
      className: (0, _classnames.default)(className, {
        "next-select-dark": theme === 'dark',
        "next-select-notick": hasTick === false
      }),
      hasTick: hasTick,
      size: size,
      popupClassName: {
        "next-menu-notick": hasTick === false
      }
    }, rest));
  });
};

var BDesignAutoComplete = function BDesignAutoComplete(props) {
  var className = props.className,
      theme = props.theme,
      _props$size2 = props.size,
      size = _props$size2 === void 0 ? 'large' : _props$size2,
      rest = (0, _objectWithoutProperties2.default)(props, ["className", "theme", "size"]);
  return /*#__PURE__*/_react.default.createElement(_components.Select.AutoComplete, (0, _extends2.default)({
    className: (0, _classnames.default)(className, {
      "next-select-dark": theme === 'dark'
    }),
    size: size
  }, rest));
};

BDesignSelect.Option = _components.Select.Option;
BDesignSelect.AutoComplete = BDesignAutoComplete;
BDesignSelect.OptionGroup = _components.Select.OptionGroup; // TODO：后续确认下
// BDesignSelect.Combobox = Select.Combobox;

var _default = BDesignSelect;
exports.default = _default;