import { Button } from '@taroify/core';

import { PREFIX } from '@/components/product-dialog/const';
import { copy } from '@/utils/common';

interface IContactDirectProps {
  publisherAcctNo: string;
  onAfterConfirm: () => void;
  onReport: () => void;
}

export default function ContactDirect(props: IContactDirectProps) {
  const { publisherAcctNo, onAfterConfirm, onReport } = props;

  const handleCopyAndContact = async () => {
    await copy(publisherAcctNo);
    onAfterConfirm();
  };

  return (
    <div className={`${PREFIX}__job-contact_direct`}>
      <div className={`${PREFIX}__job-contact_direct__header`}>您已报名本通告</div>
      <div className={`${PREFIX}__job-contact_direct__describe`}>通告发布人微信</div>
      <div className={`${PREFIX}__job-contact_direct__content`}>{publisherAcctNo}</div>
      <div className={`${PREFIX}__job-contact_direct__describe`}>请添加对方好友，并备注：播络主播报单</div>
      <Button className={`${PREFIX}__job-contact_direct__button`} onClick={handleCopyAndContact}>
        复制微信号
      </Button>
      {/* <div className={`${PREFIX}__job-contact_direct__report`} onClick={onReport}>
        上报：微信加不上
      </div> */}
    </div>
  );
}
