/** * useProductAccess Hook — checks if the current user can access a specific product. * * Uses the checkProductAccess query on the global gateway. * Returns access status, reason, and loading state. * * @module @burdenoff/fe-libs/shared/hooks/shell/useProductAccess */ export type ProductAccessReason = 'PRODUCT_ACTIVE' | 'SUPER_ADMIN_ACCESS' | 'INTERNAL_DOMAIN_ACCESS' | 'WAITLIST_APPROVED' | 'WAITLIST_PENDING' | 'WAITLIST_REJECTED' | 'WAITLIST_NOT_JOINED' | 'PRODUCT_DRAFT' | 'NO_ACCESS'; export interface ProductAccessResult { hasAccess: boolean; reason: ProductAccessReason; product?: { id: string; name: string; slug: string; appUrl?: string | null; status: string; } | null; } export interface UseProductAccessReturn { hasAccess: boolean; reason: ProductAccessReason; product: ProductAccessResult['product']; isLoading: boolean; error: string | null; refetch: () => void; } export declare function useProductAccess(productId: string): UseProductAccessReturn; /** * Same as `useProductAccess` but returns a no-access sentinel instead of * throwing when no `GatewayProvider` is mounted. Used by cross-cutting shell * chrome (TourTrigger, pre-auth widgets) that may render in trees without a * GraphQL gateway — tests, standalone previews, or embed hosts. */ export declare function useSafeProductAccess(productId: string): UseProductAccessReturn; //# sourceMappingURL=useProductAccess.d.ts.map