import { Button } from "antd";
import closeImg from "~/assets/images/map_bi/close.png";
import "./index.less";

const BranchOffice = ({ info, close, enter }) => {
  return (
    <div className="map_content_box">
      <div className="box-wrap">
        <div className="area">
          <div></div>
          <div className="area-title fontColor">{info?.corpName}</div>
          <div className="close" style={{ backgroundImage: `url(${closeImg})` }} onClick={close}></div>
        </div>
        <div className="content">
          <div className="data-li">
            <div className="data-label textColor">统一社会信用代码：</div>
            <div className="data-value">
              <span className="label-num textColor line-3">{info?.code}</span>
            </div>
          </div>
          <div className="data-li">
            <div className="data-label textColor">法定代表人：</div>
            <div className="data-value">
              <span className="label-num textColor line-3">{info?.lrName}</span>
            </div>
          </div>
          <div className="data-li">
            <div className="data-label textColor">主要负责人：</div>
            <div className="data-value">
              <span className="label-num textColor line-3">{info?.contacts}</span>
            </div>
          </div>
          <div className="data-li">
            <div className="data-label textColor">所属行业：</div>
            <div className="data-value">
              <span className="label-num textColor line-3">
                {[info?.corpTypeName, info?.corpType2Name, info?.corpType3Name, info?.corpType4Name].filter(Boolean).join("/")}
              </span>
            </div>
          </div>
          <div className="data-li">
            <div className="data-label textColor">地址：</div>
            <div className="data-value">
              <span className="label-num textColor line-3">
                {info?.address}
              </span>
            </div>
          </div>
          <div className="data-li h_60">
            <div className="btn-bottom">
              <Button
                type="primary"
                size="small"
                onClick={enter}
              >
                点击进入
              </Button>
            </div>
          </div>
        </div>
      </div>
    </div>
  );
};

export default BranchOffice;
