import React from "react";
import "./index.less";
import {Checkbox} from 'antd';
import CaptureCard from '../../../businessComponents/CaptureCard';
class Similar extends React.Component {

  onChange = e => {
    const checked = e.target.checked;
    this.props.onClick && this.props.onClick(checked, this.props.data);
  };
  render() {
    const { data = {}, imgUrl } = this.props;
    return (
      <CaptureCard
        className="similar-card"
        hoverScale={false}
        imgUrl={imgUrl}
        score={data.score}
        checkboxItem={
          <Checkbox checked={data.checked} onChange={this.onChange} />
        }
      />
    );
  }
}

export default Similar;
