import _extends from "@babel/runtime/helpers/esm/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
import React from "react";
import { Search } from "@alicloudfe/components";
import cls from "classnames";
import BDesignTheme from '../theme';

var BDesignSearch = function BDesignSearch(props) {
  var className = props.className,
      theme = props.theme,
      hasborder = props.hasborder,
      _props$size = props.size,
      size = _props$size === void 0 ? 'large' : _props$size,
      rest = _objectWithoutProperties(props, ["className", "theme", "hasborder", "size"]);

  return /*#__PURE__*/React.createElement(BDesignTheme, {
    theme: theme
  }, function (theme) {
    return /*#__PURE__*/React.createElement(Search, _extends({
      size: size,
      className: cls(className, {
        'next-search-dark': theme === "dark",
        'next-search-noborder': hasborder === false
      })
    }, rest));
  });
};

export default BDesignSearch;