"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var _extends2=require("babel-runtime/helpers/extends"),_extends3=_interopRequireDefault(_extends2),_defineProperty2=require("babel-runtime/helpers/defineProperty"),_defineProperty3=_interopRequireDefault(_defineProperty2),_classCallCheck2=require("babel-runtime/helpers/classCallCheck"),_classCallCheck3=_interopRequireDefault(_classCallCheck2),_createClass2=require("babel-runtime/helpers/createClass"),_createClass3=_interopRequireDefault(_createClass2),_possibleConstructorReturn2=require("babel-runtime/helpers/possibleConstructorReturn"),_possibleConstructorReturn3=_interopRequireDefault(_possibleConstructorReturn2),_inherits2=require("babel-runtime/helpers/inherits"),_inherits3=_interopRequireDefault(_inherits2),_react=require("react"),React=_interopRequireWildcard(_react),_rcTreeSelect=require("rc-tree-select"),_rcTreeSelect2=_interopRequireDefault(_rcTreeSelect),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames),_LocaleReceiver=require("../locale-provider/LocaleReceiver"),_LocaleReceiver2=_interopRequireDefault(_LocaleReceiver),_warning=require("../_util/warning"),_warning2=_interopRequireDefault(_warning);function _interopRequireWildcard(e){if(e&&e.__esModule)return e;var r={};if(null!=e)for(var t in e)Object.prototype.hasOwnProperty.call(e,t)&&(r[t]=e[t]);return r.default=e,r}function _interopRequireDefault(e){return e&&e.__esModule?e:{default:e}}var __rest=function(e,r){var t={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&r.indexOf(l)<0&&(t[l]=e[l]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(l=Object.getOwnPropertySymbols(e);n<l.length;n++)r.indexOf(l[n])<0&&(t[l[n]]=e[l[n]])}return t},TreeSelect=function(e){function r(e){(0,_classCallCheck3.default)(this,r);var _=(0,_possibleConstructorReturn3.default)(this,(r.__proto__||Object.getPrototypeOf(r)).call(this,e));return _.saveTreeSelect=function(e){_.rcTreeSelect=e},_.renderTreeSelect=function(e){var r,t=_.props,l=t.prefixCls,n=t.className,a=t.size,c=t.notFoundContent,i=t.dropdownStyle,o=__rest(t,["prefixCls","className","size","notFoundContent","dropdownStyle"]),s=(0,_classnames2.default)((r={},(0,_defineProperty3.default)(r,l+"-lg","large"===a),(0,_defineProperty3.default)(r,l+"-sm","small"===a),r),n),u=o.treeCheckable;return u=u&&React.createElement("span",{className:l+"-tree-checkbox-inner"}),React.createElement(_rcTreeSelect2.default,(0,_extends3.default)({},o,{prefixCls:l,className:s,dropdownStyle:(0,_extends3.default)({maxHeight:"100vh",overflow:"auto"},i),treeCheckable:u,notFoundContent:c||e.notFoundContent,ref:_.saveTreeSelect}))},(0,_warning2.default)(!1!==e.multiple||!e.treeCheckable,"`multiple` will alway be `true` when `treeCheckable` is true"),_}return(0,_inherits3.default)(r,e),(0,_createClass3.default)(r,[{key:"focus",value:function(){this.rcTreeSelect.focus()}},{key:"blur",value:function(){this.rcTreeSelect.blur()}},{key:"render",value:function(){return React.createElement(_LocaleReceiver2.default,{componentName:"Select",defaultLocale:{}},this.renderTreeSelect)}}]),r}(React.Component);(exports.default=TreeSelect).TreeNode=_rcTreeSelect.TreeNode,TreeSelect.SHOW_ALL=_rcTreeSelect.SHOW_ALL,TreeSelect.SHOW_PARENT=_rcTreeSelect.SHOW_PARENT,TreeSelect.SHOW_CHILD=_rcTreeSelect.SHOW_CHILD,TreeSelect.defaultProps={prefixCls:"dt-select",transitionName:"slide-up",choiceTransitionName:"zoom",showSearch:!1,dropdownClassName:"dt-select-tree-dropdown"},module.exports=exports.default;