/**
 * @fileoverview AuthGuard component
 * @description Protects routes based on authentication configuration
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
import { type ReactNode, type ComponentType } from 'react';
import { USER_ROLES, SUBSCRIPTION_TIERS, type PageAuth } from '@donotdev/core';
/**
 * Props for AuthGuard component
 */
interface AuthGuardProps {
    /** Auth configuration for this route */
    auth: PageAuth | false;
    /** Children to render if auth passes */
    children: ReactNode;
    /** Fallback component while checking auth */
    fallback?: ComponentType;
}
/**
 * AuthGuard component that protects routes based on authentication config
 *
 * 🎯 SINGLE SOURCE OF TRUTH: Only uses @donotdev/core, never directly calls auth
 *
 * Role System (from store):
 * - 'guest': No authentication
 * - 'user': Authenticated Firebase user
 * - 'admin': Authenticated user with Firebase custom claim isAdmin: true
 *
 * Subscription System (from store):
 * - 'free': Basic features
 * - 'pro': Professional features
 * - 'premium': Premium features
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function AuthGuard({ auth, children, fallback: Fallback, }: AuthGuardProps): import("react/jsx-runtime").JSX.Element;
/**
 * Hook to check if current user can navigate to a route with given auth config
 * ONLY uses store - single source of truth!
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function useCanNavigate(auth: PageAuth | false): boolean;
/**
 * @deprecated Use useCanNavigate instead
 */
export declare const useCanAccess: typeof useCanNavigate;
/**
 * Hook to get current user's role - directly from store
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function useUserRole(): typeof USER_ROLES.GUEST | typeof USER_ROLES.USER | typeof USER_ROLES.ADMIN;
/**
 * Hook to check specific role - directly from store
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function useHasRole(role: typeof USER_ROLES.GUEST | typeof USER_ROLES.USER | typeof USER_ROLES.ADMIN): boolean;
/**
 * Hook to get all auth state for debugging
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function useAuthState(): {
    authenticated: boolean;
    role: string | undefined;
    tier: string;
    loading: boolean;
    userId: string | undefined;
};
/**
 * HOC to wrap components with auth protection
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare function withAuth<P extends object>(Component: ComponentType<P>, auth: PageAuth | false): (props: P) => import("react/jsx-runtime").JSX.Element;
/**
 * Utility to create auth configs
 *
 * @version 0.0.3
 * @since 0.0.1
 * @author AMBROISE PARK Consulting
 */
export declare const createAuthConfig: {
    /** No authentication required */
    public: () => false;
    /** Basic authentication required */
    required: () => PageAuth;
    /** User role (any authenticated user) */
    user: () => PageAuth;
    /** Admin role (Firebase custom claim isAdmin: true) */
    admin: () => PageAuth;
    /** Tier-based authentication */
    tier: (tier: (typeof SUBSCRIPTION_TIERS)[keyof typeof SUBSCRIPTION_TIERS]) => PageAuth;
    /** Pro tier */
    pro: () => PageAuth;
    /** Premium tier */
    premium: () => PageAuth;
    /** Admin with pro tier requirement */
    adminPro: () => PageAuth;
    /** Custom validation */
    custom: (validate: (role: string, tier: string) => boolean) => PageAuth;
};
export default AuthGuard;
//# sourceMappingURL=AuthGuard.d.ts.map