export interface UseReferralResult { /** False while loading, or when the referral program is off in the dashboard. */ enabled: boolean; /** The user's referral code (lazily created server-side on first read). */ code: string | null; /** Full invite link: the dashboard's link template, or `origin/?ref=CODE` when unset. */ link: string | null; /** How many times the invite link was opened. */ clicks: number; /** Referral outcomes: pending / converted counts and credits earned so far. */ rewards: { pending: number; converted: number; creditsEarned: number; }; /** Credits the referrer earns per converted referral (dashboard config). */ rewardCredits: number; /** Credits the invited friend gets on conversion (dashboard config, 0 = off). */ referredRewardCredits: number; loading: boolean; error: Error | null; /** Copy the invite link (falls back to the code) to the clipboard. */ copy: () => Promise; /** True for 2s after a successful copy — for "Copied!" feedback. */ copied: boolean; /** Open the native share sheet with the invite link; falls back to copy. */ share: () => Promise; /** Refetch code/stats. */ refresh: () => Promise; } /** * Headless referral hook — render any invite UI on top of it: * * const { link, copy, share, rewards, loading } = useReferral(); * * Must be used inside . The referral * code is created lazily by the server on the first call and stays stable. * When the dashboard's referral program is disabled, `enabled` is false and * everything else stays empty — render nothing in that case (as * does). */ export declare function useReferral(): UseReferralResult;