import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutPropertiesLoose from "@babel/runtime/helpers/objectWithoutPropertiesLoose";
import _MenuButton from "@alifd/next/es/menu-button";
var _excluded = ["title", "standards", "encoded", "controlType", "style", "customStyleName"];
import * as React from 'react';
import "./index.scss";
var Item = _MenuButton.Item;
var DropDownButton = function DropDownButtonProps(_ref) {
  var _ref$title = _ref.title,
    title = _ref$title === void 0 ? '下拉按钮' : _ref$title,
    _ref$standards = _ref.standards,
    standards = _ref$standards === void 0 ? 'primary' : _ref$standards,
    encoded = _ref.encoded,
    controlType = _ref.controlType,
    _ref$style = _ref.style,
    style = _ref$style === void 0 ? {} : _ref$style,
    customStyleName = _ref.customStyleName,
    otherProps = _objectWithoutPropertiesLoose(_ref, _excluded);
  var _otherProps = otherProps || {};
  var isDisable = standards === 'normal' ? true : false;
  var menu = ["选项一", "选项二", "选项三"].map(function (item) {
    return /*#__PURE__*/React.createElement(Item, {
      key: item
    }, item);
  });
  return /*#__PURE__*/React.createElement(_MenuButton, _extends({
    style: style,
    label: title,
    type: standards,
    disabled: isDisable
  }, _otherProps), menu);
};
DropDownButton.displayName = 'DropDownButton';
export default DropDownButton;