import { WechatScanLogin } from './WechatScanLogin';

/** PC 浏览器微信扫码登录（开放平台优先，否则公众号 OAuth + PC 轮询） */
export function WechatDesktopLogin({
  returnTo,
  onBindingGate,
  onComplete,
  onError,
}: {
  returnTo?: string | null;
  onBindingGate: (pendingToken: string) => void;
  onComplete: () => void;
  onError: (message: string) => void;
}) {
  return (
    <div className="login-wechat-scan-card">
      <div className="login-wechat-scan-head">
        <span>微信扫码登录</span>
      </div>
      <WechatScanLogin
        returnTo={returnTo}
        onBindingGate={onBindingGate}
        onComplete={onComplete}
        onError={onError}
      />
    </div>
  );
}
