import { CreditTransaction, RedeemProductResponse } from '../../core/resources/credits'; export interface UseCreditsOptions { /** * Customer ID to fetch credits for */ customerId?: string | null; /** * Whether to fetch credits automatically on mount * @default true */ enabled?: boolean; } export interface UseCreditsResult { /** * Customer credit balance */ balance: number; /** * Lifetime credits earned */ lifetimeEarned: number; /** * Lifetime credits spent */ lifetimeSpent: number; /** * Credit transaction history */ transactions: CreditTransaction[]; /** * Loading state */ isLoading: boolean; /** * Error state */ error: Error | null; /** * Refetch credit balance and history */ refetch: () => Promise; /** * Redeem a product using credits */ redeemProduct: (data: { productId?: string; variantId: string; quantity?: number; }) => Promise; /** * Check if customer has enough credits for a purchase */ hasEnoughCredits: (amount: number) => boolean; /** * Get transaction by ID */ getTransaction: (transactionId: string) => CreditTransaction | undefined; /** * Redemption mutation state */ isRedeeming: boolean; /** * Redemption error state */ redeemError: Error | null; } export declare function useCredits(options?: UseCreditsOptions): UseCreditsResult;