import { ReactNode, JSX } from 'react'; import { ADConfig, ADContextValue, ADAuthState, ADAuthEvent } from './types'; import { createGroupMapper, createAttributeMapper } from '..'; import { createSSOManager } from './ad-sso'; /** * AD Authentication Context. */ export declare const ADContext: import('react').Context; /** * AD Provider component props. */ export interface ADProviderProps { /** AD configuration */ config: ADConfig; /** Child components */ children: ReactNode; /** Group to role mapping configuration */ groupMappings?: Parameters[0]; /** Custom attribute mapper configuration */ attributeMapperConfig?: Parameters[0]; /** Enable SSO support */ enableSSO?: boolean; /** SSO configuration */ ssoConfig?: Parameters[0]; /** Callback when authentication state changes */ onAuthStateChange?: (state: ADAuthState) => void; /** Callback when authentication events occur */ onAuthEvent?: (event: ADAuthEvent) => void; /** Loading component to show during initialization */ loadingComponent?: ReactNode; /** Error component to show on configuration errors */ errorComponent?: (error: string) => ReactNode; } /** * Active Directory Authentication Provider. * * Provides AD authentication context to child components. Manages * authentication state, token refresh, group mapping, and SSO. * * @example * ```tsx * import { ADProvider } from '@/lib/auth/active-directory'; * import { createADConfig } from '@/lib/auth/active-directory'; * * const adConfig = createADConfig('azure-ad', { * tenantId: process.env.AZURE_AD_TENANT_ID, * clientId: process.env.AZURE_AD_CLIENT_ID, * redirectUri: window.location.origin, * }); * * function App() { * return ( * * * * ); * } * ``` */ export declare function ADProvider({ config, children, groupMappings, attributeMapperConfig, enableSSO, ssoConfig, onAuthStateChange, onAuthEvent, loadingComponent, errorComponent, }: ADProviderProps): JSX.Element;