/**
 * TenantProvider
 *
 * Provider that manages tenant-related state and access control.
 * It handles:
 * - Tenant validation and access control
 * - Tenant switching logic
 * - Tenant metadata retrieval
 * - User-tenant relationship verification
 */
import React from "react";
import { TokenResponse } from "@iblai/data-layer";
import { Tenant } from "@web-utils/types";
/**
 * Type definition for the tenant context
 * Tracks whether the user's path needs to be determined and provides a setter
 */
export type TenantContextType = {
    determineUserPath: boolean;
    setDetermineUserPath: (value: boolean) => void;
    tenantKey: string;
    setTenantKey: (tenantKey: string) => void;
    metadata: Record<string, any>;
    setMetadata: (metadata: Record<string, any>) => void;
};
export declare const TenantContext: React.Context<TenantContextType | undefined>;
/**
 * Context Provider component that wraps children with tenant context
 */
export declare const TenantContextProvider: React.FC<{
    value: TenantContextType;
    children: React.ReactNode;
}>;
/**
 * Hook to access the tenant context
 * @returns TenantContextType
 */
export declare const useTenantContext: () => TenantContextType;
/**
 * Props for the TenantProvider component
 */
type Props = {
    children?: React.ReactNode;
    fallback?: React.ReactNode;
    onAuthSuccess?: () => void;
    onAuthFailure?: (reason: string) => void;
    currentTenant: string;
    requestedTenant: string;
    handleTenantSwitch: (tenant: string, saveRedirect: boolean, useCustomDomain?: boolean) => Promise<void>;
    saveCurrentTenant: (tenant: Tenant) => void;
    saveUserTenants: (tenants: Tenant[]) => void;
    saveVisitingTenant?: (tenant: Tenant) => void;
    removeVisitingTenant?: () => void;
    saveUserTokens?: (tokens: TokenResponse) => void;
    saveTenant?: (tenant: string) => void;
    onAutoJoinUserToTenant?: (platformName: string) => void;
    redirectToAuthSpa?: (redirectTo?: string, platformKey?: string, logout?: boolean, saveRedirect?: boolean) => void;
    username?: string;
    isIframed?: boolean;
    setUseMentorProvider?: (useMentorProvider: boolean) => void;
    skip?: boolean;
    onLoadPlatformPermissions?: (rbacPermissions: Record<string, unknown> | undefined) => void;
    skipCustomDomainCheck?: boolean;
};
/**
 * TenantProvider Component
 *
 * Main tenant provider that:
 * 1. Validates user's access to requested tenant
 * 2. Manages tenant switching
 * 3. Retrieves and validates tenant metadata
 * 4. Handles tenant-specific domain redirects
 * 5. Maintains tenant access state
 */
export declare function TenantProvider({ children, fallback, onAuthSuccess, onAuthFailure, currentTenant, requestedTenant, saveCurrentTenant, saveUserTenants, handleTenantSwitch, saveVisitingTenant, removeVisitingTenant, saveUserTokens, saveTenant, onAutoJoinUserToTenant, redirectToAuthSpa, username, isIframed, setUseMentorProvider, skip, onLoadPlatformPermissions, skipCustomDomainCheck, }: Props): string | number | bigint | boolean | Iterable<React.ReactNode> | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined> | import("react/jsx-runtime").JSX.Element | null | undefined;
export {};
