import React from "react";
import { placeInfoCard, CheckBoxItem } from "../../utils";
import { Checkbox} from 'antd';
const CheckGroup=Checkbox.Group
class placeCard extends React.Component {
  render() {
    let { id, searchKeyChange, selectDataList, click } = this.props;
    let selectKeys = selectDataList[id] || [];
    return (
      <>
        {placeInfoCard(id, click)}
        <div className="relation-search-box">
          <div className="relation-search-title">查询关系：</div>
          <div className="relation-search-content">
            <CheckGroup onChange={searchKeyChange} defaultValue={selectKeys}>
              {CheckBoxItem(
                selectKeys,
                "getAidsByFrequentPid30",
                "近一月常去该地"
              )}
              {CheckBoxItem(
                selectKeys,
                "getAidsByFrequentPid7",
                "近一周常去该地"
              )}
            </CheckGroup>
          </div>
        </div>
      </>
    );
  }
}

export default placeCard;
