import{s as k,f as d,b4 as u,t as y,b2 as b,z as m,P as C,Q as c,D as f}from"./index-BPRWoLf4.js";var v=function(n){k(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t.prototype.handleClick=function(e){var a=this.props,s=a.checkOnItemClick,r=a.selectable;s&&r&&this.handleCheck()},t.prototype.handleCheck=function(){var e,a;(a=(e=this.props).onCheck)===null||a===void 0||a.call(e)},t.prototype.renderCheckbox=function(){var e=this.props,a=e.selectable,s=e.classnames,r=e.multiple,l=e.disabled,o=e.selected,i=e.hideCheckToggler,p=e.checkOnItemClick,h=e.checkboxClassname;return!a||p&&i?null:d.createElement(u,{className:s("Card2-checkbox",h),type:r?"checkbox":"radio",disabled:l,checked:o,onChange:this.handleCheck})},t.prototype.renderBody=function(){var e=this.props,a=e.body,s=e.render,r=e.classnames,l=e.bodyClassName,o=y(e,["body","render","classnames","bodyClassName"]);return d.createElement("div",{className:r("Card2-body",l),onClick:this.handleClick},a?s("body",a,o):null)},t.prototype.render=function(){var e=this.props,a=e.className,s=e.wrapperComponent,r=e.classnames,l=e.style,o=e.item,i=e.selected,p=e.checkOnItemClick,h=s||"div";return d.createElement(h,{className:r("Card2",a,{checkOnItem:p,"is-checked":i}),style:b(l,o)},this.renderBody(),this.renderCheckbox())},t.propsList=["body","className"],t.defaultProps={className:""},m([C,c("design:type",Function),c("design:paramtypes",[Object]),c("design:returntype",void 0)],t.prototype,"handleClick",null),m([C,c("design:type",Function),c("design:paramtypes",[]),c("design:returntype",void 0)],t.prototype,"handleCheck",null),t}(d.Component),x=function(n){k(t,n);function t(){return n!==null&&n.apply(this,arguments)||this}return t=m([f({type:"card2"})],t),t}(v);export{x as Card2Renderer,v as default};
