import { JSONObject, XID } from './index';
import { AuthMethod, OAuthProvider } from './auth';
import { ComponentType, ReactNode } from 'react';
export type SizeT = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
export type RadiusT = 'none' | 'sm' | 'md' | 'lg' | 'xl';
export type ShadowT = 'none' | 'sm' | 'md' | 'lg' | 'xl';
export interface FrankAuthConfig {
    publishableKey: string;
    apiUrl?: string;
    environment?: 'development' | 'staging' | 'production';
    organizationId?: XID;
    allowOrganizationSwitching?: boolean;
    authentication: AuthenticationConfig;
    appearance: AppearanceConfig;
    localization: LocalizationConfig;
    components: ComponentConfig;
    features: FeatureConfig;
    routing: RoutingConfig;
    session: SessionConfig;
    custom?: JSONObject;
}
export interface AuthenticationConfig {
    methods: AuthMethod[];
    primaryMethod: AuthMethod;
    signIn: SignInConfig;
    signUp: SignUpConfig;
    oauth: OAuthConfig;
    mfa: MFAConfig;
    passkeys: PasskeyConfig;
    password: PasswordConfig;
    verification: VerificationConfig;
}
export interface SignInConfig {
    enabled: boolean;
    allowedMethods: AuthMethod[];
    defaultMethod: AuthMethod;
    showAlternativeMethods: boolean;
    allowRememberMe: boolean;
    requireEmailVerification: boolean;
    allowPasswordReset: boolean;
    redirectUrl?: string;
    afterSignInUrl?: string;
    maxAttempts?: number;
    lockoutDuration?: number;
}
export interface SignUpConfig {
    enabled: boolean;
    allowedMethods: AuthMethod[];
    defaultMethod: AuthMethod;
    requireEmailVerification: boolean;
    requirePhoneVerification: boolean;
    allowedFields: string[];
    requiredFields: string[];
    captchaEnabled: boolean;
    termsOfServiceUrl?: string;
    privacyPolicyUrl?: string;
    redirectUrl?: string;
    afterSignUpUrl?: string;
}
export interface OAuthConfig {
    enabled: boolean;
    providers: OAuthProviderConfig[];
    allowAccountLinking: boolean;
    popupMode: boolean;
    redirectMode: 'popup' | 'redirect';
}
export interface OAuthProviderConfig {
    provider: OAuthProvider;
    enabled: boolean;
    clientId?: string;
    scopes?: string[];
    buttonText?: string;
    buttonIcon?: string;
    buttonStyle?: 'full' | 'icon' | 'minimal';
    customParameters?: Record<string, string>;
    redirectUrl?: string;
}
export interface MFAConfig {
    enabled: boolean;
    required: boolean;
    allowedMethods: ('totp' | 'sms' | 'email' | 'backup_codes')[];
    defaultMethod: 'totp' | 'sms' | 'email';
    backupCodesEnabled: boolean;
    gracePeriod?: number;
    rememberDevice: boolean;
    rememberDeviceDuration?: number;
}
export interface PasskeyConfig {
    enabled: boolean;
    allowRegistration: boolean;
    allowAuthentication: boolean;
    requireUserVerification: boolean;
    rpName: string;
    rpId?: string;
    timeout?: number;
    attestation?: 'none' | 'indirect' | 'direct';
}
export interface PasswordConfig {
    enabled: boolean;
    minLength: number;
    maxLength: number;
    requireUppercase: boolean;
    requireLowercase: boolean;
    requireNumbers: boolean;
    requireSymbols: boolean;
    allowCommonPasswords: boolean;
    maxAge?: number;
    historyCount?: number;
    showStrengthIndicator: boolean;
    allowPasswordManager: boolean;
}
export interface VerificationConfig {
    email: {
        enabled: boolean;
        required: boolean;
        allowResend: boolean;
        resendCooldown: number;
        expirationTime: number;
        template?: string;
    };
    phone: {
        enabled: boolean;
        required: boolean;
        allowResend: boolean;
        resendCooldown: number;
        expirationTime: number;
        allowedCountries?: string[];
        blockedCountries?: string[];
    };
}
export interface AppearanceConfig {
    theme: ThemeConfig;
    layout: LayoutConfig;
    branding: BrandingConfig;
    elements: ElementConfig;
    colorScheme: 'light' | 'dark' | 'system';
    customCSS?: string;
}
export interface ThemeConfig {
    primary: string;
    secondary: string;
    accent: string;
    background: string;
    foreground: string;
    muted: string;
    border: string;
    input: string;
    ring: string;
    destructive: string;
    warning: string;
    success: string;
    info: string;
}
export interface LayoutConfig {
    containerMaxWidth: string;
    sidebarWidth: string;
    headerHeight: string;
    footerHeight: string;
    contentPadding: string;
    card: {
        width: 'sm' | 'md' | 'lg' | 'xl' | 'full';
        padding: 'sm' | 'md' | 'lg';
        rounded: 'none' | 'sm' | 'md' | 'lg' | 'xl';
        shadow: 'none' | 'sm' | 'md' | 'lg' | 'xl';
        border: boolean;
    };
    modal: {
        size: 'sm' | 'md' | 'lg' | 'xl' | 'full';
        overlay: boolean;
        closeOnOverlayClick: boolean;
        showCloseButton: boolean;
    };
    form: {
        spacing: 'sm' | 'md' | 'lg';
        labelPosition: 'top' | 'left' | 'floating';
        buttonSize: 'sm' | 'md' | 'lg';
        buttonWidth: 'auto' | 'full';
    };
}
export interface BrandingConfig {
    logo?: string;
    logoUrl?: string;
    favicon?: string;
    applicationName?: string;
    tagline?: string;
    supportEmail?: string;
    supportUrl?: string;
    termsOfServiceUrl?: string;
    privacyPolicyUrl?: string;
    showPoweredBy: boolean;
}
export interface ElementConfig {
    fontFamily?: string;
    fontSize?: 'xs' | 'sm' | 'base' | 'lg' | 'xl';
    button?: {
        primary?: string;
        secondary?: string;
        outline?: string;
        ghost?: string;
        destructive?: string;
    };
    input?: {
        base?: string;
        focus?: string;
        error?: string;
        disabled?: string;
    };
    card?: {
        base?: string;
        header?: string;
        body?: string;
        footer?: string;
    };
    form?: {
        label?: string;
        error?: string;
        helper?: string;
    };
    link?: {
        base?: string;
        hover?: string;
        visited?: string;
    };
}
export interface LocalizationConfig {
    defaultLocale: string;
    availableLocales: string[];
    allowLocaleSwitching: boolean;
    customTranslations?: Record<string, Record<string, string>>;
    dateFormat: string;
    timeFormat: string;
    timezone?: string;
    numberFormat: {
        locale: string;
        currency?: string;
    };
}
export interface ComponentConfig {
    globalProps?: Record<string, any>;
    overrides?: ComponentOverrides;
    slots?: ComponentSlots;
    customComponents?: CustomComponents;
}
export interface ComponentOverrides {
    SignIn?: ComponentOverride;
    SignUp?: ComponentOverride;
    UserButton?: ComponentOverride;
    UserProfile?: ComponentOverride;
    OrganizationSwitcher?: ComponentOverride;
    OrganizationProfile?: ComponentOverride;
    PasswordField?: ComponentOverride;
    EmailField?: ComponentOverride;
    PhoneField?: ComponentOverride;
    AuthLayout?: ComponentOverride;
    ModalLayout?: ComponentOverride;
    CardLayout?: ComponentOverride;
}
export interface ComponentOverride {
    props?: Record<string, any>;
    className?: string;
    style?: Record<string, any>;
    replace?: ComponentType<any>;
    wrapper?: ComponentType<any>;
}
export interface ComponentSlots {
    beforeSignIn?: ReactNode;
    afterSignIn?: ReactNode;
    beforeSignUp?: ReactNode;
    afterSignUp?: ReactNode;
    header?: ReactNode;
    footer?: ReactNode;
    sidebar?: ReactNode;
    loading?: ReactNode;
    error?: ReactNode;
}
export interface CustomComponents {
    LoadingSpinner?: ComponentType<any>;
    ErrorBoundary?: ComponentType<any>;
    SuccessMessage?: ComponentType<any>;
    ErrorMessage?: ComponentType<any>;
    Avatar?: ComponentType<any>;
    Button?: ComponentType<any>;
    Input?: ComponentType<any>;
    Card?: ComponentType<any>;
    Modal?: ComponentType<any>;
}
export interface FeatureConfig {
    signIn: boolean;
    signUp: boolean;
    userProfile: boolean;
    passwordReset: boolean;
    emailVerification: boolean;
    phoneVerification: boolean;
    organizations: boolean;
    organizationSwitcher: boolean;
    organizationProfile: boolean;
    memberManagement: boolean;
    roleManagement: boolean;
    mfa: boolean;
    passkeys: boolean;
    sessionManagement: boolean;
    deviceManagement: boolean;
    auditLog: boolean;
    impersonation: boolean;
    bulkOperations: boolean;
    apiKeys: boolean;
    webhooks: boolean;
    darkMode: boolean;
    customBranding: boolean;
    localization: boolean;
    accessibility: boolean;
}
export interface RoutingConfig {
    basePath: string;
    signInPath: string;
    signUpPath: string;
    userProfilePath: string;
    organizationProfilePath: string;
    afterSignInUrl: string;
    afterSignUpUrl: string;
    afterSignOutUrl: string;
    protectedRoutes: string[];
    publicRoutes: string[];
    customRedirects?: Record<string, string>;
}
export interface SessionConfig {
    duration: number;
    inactivityTimeout: number;
    refreshTokenRotation: boolean;
    storage: 'cookie' | 'localStorage' | 'sessionStorage';
    cookie: {
        name: string;
        domain?: string;
        secure: boolean;
        sameSite: 'strict' | 'lax' | 'none';
        httpOnly: true;
    };
    monitoring: {
        enabled: boolean;
        trackActivity: boolean;
        trackLocation: boolean;
        trackDevice: boolean;
    };
}
export interface ServerConfig {
    organizationConfig?: OrganizationSpecificConfig;
    featureFlags?: Record<string, boolean>;
    brandingOverrides?: BrandingConfig;
    authenticationPolicies?: AuthenticationPolicies;
    uiCustomization?: UICustomization;
}
export interface OrganizationSpecificConfig {
    organizationId: XID;
    customDomain?: string;
    customBranding?: BrandingConfig;
    authenticationMethods?: AuthMethod[];
    mfaRequired?: boolean;
    allowedEmailDomains?: string[];
    customCSS?: string;
    customComponents?: CustomComponents;
    featureOverrides?: Partial<FeatureConfig>;
}
export interface AuthenticationPolicies {
    passwordPolicy: {
        minLength: number;
        maxLength: number;
        requireUppercase: boolean;
        requireLowercase: boolean;
        requireNumbers: boolean;
        requireSymbols: boolean;
        preventReuse: number;
        maxAge?: number;
    };
    sessionPolicy: {
        maxDuration: number;
        inactivityTimeout: number;
        maxConcurrentSessions: number;
        requireReauth: boolean;
    };
    mfaPolicy: {
        required: boolean;
        allowedMethods: string[];
        gracePeriod?: number;
    };
    lockoutPolicy: {
        enabled: boolean;
        maxAttempts: number;
        lockoutDuration: number;
    };
}
export interface UICustomization {
    customCSS?: string;
    customComponents?: Record<string, ComponentType<any>>;
    customThemes?: Record<string, ThemeConfig>;
    customLayouts?: Record<string, ComponentType<any>>;
    customTranslations?: Record<string, Record<string, string>>;
}
export interface ConfigValidation {
    valid: boolean;
    errors: string[];
    warnings: string[];
}
export declare const DEFAULT_CONFIG: Partial<FrankAuthConfig>;
//# sourceMappingURL=config.d.ts.map