"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),_classnames=require("classnames"),_classnames2=_interopRequireDefault(_classnames);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 a in e)Object.prototype.hasOwnProperty.call(e,a)&&r.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var l=0;for(a=Object.getOwnPropertySymbols(e);l<a.length;l++)r.indexOf(a[l])<0&&(t[a[l]]=e[a[l]])}return t},CheckableTag=function(e){function r(){(0,_classCallCheck3.default)(this,r);var a=(0,_possibleConstructorReturn3.default)(this,(r.__proto__||Object.getPrototypeOf(r)).apply(this,arguments));return a.handleClick=function(){var e=a.props,r=e.checked,t=e.onChange;t&&t(!r)},a}return(0,_inherits3.default)(r,e),(0,_createClass3.default)(r,[{key:"render",value:function(){var e,r=this.props,t=r.prefixCls,a=void 0===t?"dt-tag":t,l=r.className,s=r.checked,n=__rest(r,["prefixCls","className","checked"]),i=(0,_classnames2.default)(a,(e={},(0,_defineProperty3.default)(e,a+"-checkable",!0),(0,_defineProperty3.default)(e,a+"-checkable-checked",s),e),l);return delete n.onChange,React.createElement("div",(0,_extends3.default)({},n,{className:i,onClick:this.handleClick}))}}]),r}(React.Component);exports.default=CheckableTag,module.exports=exports.default;