'use client';

import { default as React } from 'react';
export interface RedirectHandlerProps {
    /**
     * Redirect type to handle
     */
    type?: 'oauth' | 'magic-link' | 'invitation' | 'verification' | 'auto';
    /**
     * Success redirect URL
     */
    successUrl?: string;
    /**
     * Error redirect URL
     */
    errorUrl?: string;
    /**
     * Callback after successful redirect
     */
    onSuccess?: (result: any) => void;
    /**
     * Callback after failed redirect
     */
    onError?: (error: Error) => void;
    /**
     * Custom loading component
     */
    loadingComponent?: React.ReactNode;
    /**
     * Custom error component
     */
    errorComponent?: React.ComponentType<{
        error: Error;
        retry: () => void;
    }>;
    /**
     * Whether to show loading state
     */
    showLoading?: boolean;
    /**
     * Loading text
     */
    loadingText?: string;
    /**
     * Custom className
     */
    className?: string;
    /**
     * Children to render instead of default handling
     */
    children?: React.ReactNode;
}
export declare function RedirectHandler({ type, successUrl, errorUrl, onSuccess, onError, loadingComponent, errorComponent: ErrorComponent, showLoading, loadingText, className, children, }: RedirectHandlerProps): import("react/jsx-runtime").JSX.Element | null;
export declare function useRedirectHandler(): {
    redirectType: string | null;
    isProcessing: boolean;
    error: Error | null;
    handleSuccess: (result: any) => void;
    handleError: (error: Error) => void;
    hasRedirect: boolean;
};
export default RedirectHandler;
//# sourceMappingURL=redirect-handler.d.ts.map