'use client';

import { useEffect } from 'react';
import { captureRef } from '@/lib/partnerRef';

/**
 * PartnerRefCapture (A1 S3) — mounted once in the layout (GlobalHosts
 * pattern). On first visit with ?ref=CODE it sets the first-party
 * `vyndr_ref` cookie (90 days, first-touch). Renders nothing.
 */
export default function PartnerRefCapture() {
  useEffect(() => {
    captureRef(window);
  }, []);
  return null;
}
