import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from "react";
import { Select } from "@alicloudfe/components";
import cls from "classnames";
import BDesignTheme from '../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 = _objectWithoutProperties(props, ["className", "theme", "size", "hasTick"]);

  return /*#__PURE__*/React.createElement(BDesignTheme, {
    theme: theme
  }, function (theme) {
    return /*#__PURE__*/React.createElement(Select, _extends({
      className: cls(className, {
        "next-select-dark": theme === 'dark',
        "next-select-notick": hasTick === false
      }),
      hasTick: hasTick,
      size: size,
      popupClassName: {
        "next-menu-notick": hasTick === false
      }
    }, rest));
  });
};

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

export default BDesignSelect;