import _extends from"babel-runtime/helpers/extends";import _defineProperty from"babel-runtime/helpers/defineProperty";import _classCallCheck from"babel-runtime/helpers/classCallCheck";import _createClass from"babel-runtime/helpers/createClass";import _possibleConstructorReturn from"babel-runtime/helpers/possibleConstructorReturn";import _inherits from"babel-runtime/helpers/inherits";import*as React from"react";import classNames from"classnames";import PureRenderMixin from"rc-util/es/PureRenderMixin";import Lazyload from"react-lazy-load";import Checkbox from"../checkbox";var Item=function(e){function t(){return _classCallCheck(this,t),_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return _inherits(t,e),_createClass(t,[{key:"shouldComponentUpdate",value:function(){for(var e=arguments.length,t=Array(e),r=0;r<e;r++)t[r]=arguments[r];return PureRenderMixin.shouldComponentUpdate.apply(this,t)}},{key:"render",value:function(){var e,t=this.props,r=t.renderedText,n=t.renderedEl,o=t.item,l=t.lazy,i=t.checked,a=t.prefixCls,s=t.onClick,c=classNames((_defineProperty(e={},a+"-content-item",!0),_defineProperty(e,a+"-content-item-checked",i),_defineProperty(e,a+"-content-item-disabled",o.disabled),e)),m=React.createElement("li",{className:c,title:r,onClick:o.disabled?void 0:function(){return s(o)}},React.createElement(Checkbox,{checked:i,disabled:o.disabled}),React.createElement("span",null,n)),p=null;if(l){var d=_extends({height:26,offset:500,throttle:0,debounce:!1},l);p=React.createElement(Lazyload,d,m)}else p=m;return p}}]),t}(React.Component);export default Item;