import { ButtonHTMLAttributes, ComponentType, FormHTMLAttributes, InputHTMLAttributes, ReactNode } from 'react';
import { XID } from './index';
import { User } from './user';
import { Organization, OrganizationSummary } from './organization';
import { Session } from './session';
import { AuthMethod, OAuthProvider } from './auth';
import { FrankAuthConfig } from './config';
export interface BaseComponentProps {
    className?: string;
    style?: React.CSSProperties;
    children?: ReactNode;
    'data-testid'?: string;
}
export interface LayoutProps extends BaseComponentProps {
    variant?: 'card' | 'modal' | 'fullscreen' | 'embedded';
    size?: 'sm' | 'md' | 'lg' | 'xl' | 'full';
    padding?: 'none' | 'sm' | 'md' | 'lg';
    centered?: boolean;
    showHeader?: boolean;
    showFooter?: boolean;
    headerSlot?: ReactNode;
    footerSlot?: ReactNode;
}
export interface AuthComponentProps extends BaseComponentProps {
    organizationId?: XID;
    redirectUrl?: string;
    afterSignInUrl?: string;
    afterSignUpUrl?: string;
    routing?: 'path' | 'hash' | 'virtual';
    appearance?: {
        theme?: string;
        variables?: Record<string, string>;
        elements?: Record<string, string>;
    };
    localization?: {
        locale?: string;
        customMessages?: Record<string, string>;
    };
}
export interface SignInProps extends AuthComponentProps {
    methods?: AuthMethod[];
    primaryMethod?: AuthMethod;
    oauthProviders?: OAuthProvider[];
    oauthRedirectMode?: 'popup' | 'redirect';
    fields?: SignInFieldConfig[];
    showAlternativeMethods?: boolean;
    allowRememberMe?: boolean;
    allowPasswordReset?: boolean;
    allowSignUp?: boolean;
    signUpUrl?: string;
    onSignInSuccess?: (user: User, session: Session) => void;
    onSignInError?: (error: Error) => void;
    onMfaRequired?: (challenge: any) => void;
    customFields?: ReactNode;
    customButtons?: ReactNode;
    customHeader?: ReactNode;
    customFooter?: ReactNode;
    layout?: LayoutProps;
}
export interface SignUpProps extends AuthComponentProps {
    methods?: AuthMethod[];
    primaryMethod?: AuthMethod;
    oauthProviders?: OAuthProvider[];
    oauthRedirectMode?: 'popup' | 'redirect';
    fields?: SignUpFieldConfig[];
    requiredFields?: string[];
    allowSignIn?: boolean;
    signInUrl?: string;
    requireTermsAcceptance?: boolean;
    termsOfServiceUrl?: string;
    privacyPolicyUrl?: string;
    requireEmailVerification?: boolean;
    requirePhoneVerification?: boolean;
    invitationToken?: string;
    invitationMode?: boolean;
    onSignUpSuccess?: (user: User, session?: Session) => void;
    onSignUpError?: (error: Error) => void;
    onVerificationRequired?: (method: string) => void;
    customFields?: ReactNode;
    customButtons?: ReactNode;
    customHeader?: ReactNode;
    customFooter?: ReactNode;
    layout?: LayoutProps;
}
export interface UserButtonProps extends BaseComponentProps {
    user?: User;
    showUserInfo?: boolean;
    showEmailAddress?: boolean;
    showUsername?: boolean;
    organization?: Organization;
    showOrganization?: boolean;
    allowOrganizationSwitching?: boolean;
    showProfileMenuItem?: boolean;
    showOrganizationMenuItem?: boolean;
    showSettingsMenuItem?: boolean;
    showHelpMenuItem?: boolean;
    showSignOutMenuItem?: boolean;
    customMenuItems?: UserButtonMenuItem[];
    appearance?: 'default' | 'minimal' | 'avatar-only';
    avatarSize?: 'sm' | 'md' | 'lg';
    showCaret?: boolean;
    onProfileClick?: () => void;
    onOrganizationClick?: () => void;
    onSettingsClick?: () => void;
    onHelpClick?: () => void;
    onSignOutClick?: () => void;
    onSignOut?: () => void;
    customAvatar?: ReactNode;
    customTrigger?: ReactNode;
    customContent?: ReactNode;
}
export interface UserProfileProps extends AuthComponentProps {
    user?: User;
    mode?: 'modal' | 'navigation' | 'embedded';
    initialPage?: 'profile' | 'security' | 'connected-accounts' | 'organization';
    allowProfileEdit?: boolean;
    allowPasswordChange?: boolean;
    allowEmailChange?: boolean;
    allowPhoneChange?: boolean;
    allowUsernameChange?: boolean;
    allowAccountDeletion?: boolean;
    allowMfaManagement?: boolean;
    allowPasskeyManagement?: boolean;
    allowSessionManagement?: boolean;
    allowConnectedAccounts?: boolean;
    allowOrganizationManagement?: boolean;
    allowMembershipManagement?: boolean;
    customPages?: UserProfilePage[];
    customFields?: UserProfileField[];
    onProfileUpdate?: (user: User) => void;
    onPasswordChange?: () => void;
    onMfaChange?: (enabled: boolean) => void;
    onAccountDelete?: () => void;
    layout?: LayoutProps;
}
export interface OrganizationSwitcherProps extends BaseComponentProps {
    currentOrganization?: Organization;
    organizations?: OrganizationSummary[];
    allowOrganizationCreation?: boolean;
    allowPersonalWorkspace?: boolean;
    showOrganizationProfile?: boolean;
    appearance?: 'default' | 'minimal' | 'compact';
    showCreateOrganization?: boolean;
    showOrganizationSuggestions?: boolean;
    onOrganizationSwitch?: (organization: Organization) => void;
    onOrganizationCreate?: () => void;
    onOrganizationProfile?: (organization: Organization) => void;
    customTrigger?: ReactNode;
    customContent?: ReactNode;
    customCreateButton?: ReactNode;
    hidePersonalWorkspace?: boolean;
    organizationProfileMode?: 'modal' | 'navigation' | 'redirect';
    organizationProfileUrl?: string;
}
export interface OrganizationProfileProps extends AuthComponentProps {
    organization?: Organization;
    mode?: 'modal' | 'navigation' | 'embedded';
    initialPage?: 'general' | 'members' | 'settings' | 'billing' | 'security';
    allowProfileEdit?: boolean;
    allowMemberManagement?: boolean;
    allowRoleManagement?: boolean;
    allowInvitations?: boolean;
    allowBillingManagement?: boolean;
    allowDomainManagement?: boolean;
    allowSSOConfiguration?: boolean;
    allowOrganizationDeletion?: boolean;
    allowMemberInvite?: boolean;
    allowMemberRemove?: boolean;
    allowMemberRoleChange?: boolean;
    allowMemberSuspension?: boolean;
    customPages?: OrganizationProfilePage[];
    customFields?: OrganizationProfileField[];
    onOrganizationUpdate?: (organization: Organization) => void;
    onMemberInvite?: (invitation: any) => void;
    onMemberUpdate?: (member: any) => void;
    onMemberRemove?: (memberId: XID) => void;
    onBillingUpdate?: (billing: any) => void;
    layout?: LayoutProps;
}
export interface SignInFieldConfig {
    name: 'email' | 'username' | 'phone' | 'password';
    required?: boolean;
    placeholder?: string;
    label?: string;
    helperText?: string;
    validation?: {
        required?: boolean;
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        custom?: (value: string) => string | undefined;
    };
}
export interface SignUpFieldConfig {
    name: 'email' | 'username' | 'phone' | 'password' | 'firstName' | 'lastName' | 'confirmPassword';
    required?: boolean;
    placeholder?: string;
    label?: string;
    helperText?: string;
    validation?: {
        required?: boolean;
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        custom?: (value: string) => string | undefined;
    };
}
export interface UserButtonMenuItem {
    label: string;
    icon?: ReactNode;
    onClick: () => void;
    disabled?: boolean;
    destructive?: boolean;
    separator?: boolean;
}
export interface UserProfilePage {
    id: string;
    label: string;
    icon?: ReactNode;
    component: ComponentType<any>;
    path?: string;
    enabled?: boolean;
}
export interface UserProfileField {
    name: string;
    label: string;
    type: 'text' | 'email' | 'phone' | 'password' | 'textarea' | 'select' | 'checkbox' | 'custom';
    component?: ComponentType<any>;
    required?: boolean;
    disabled?: boolean;
    placeholder?: string;
    helperText?: string;
    validation?: {
        required?: boolean;
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        options?: Array<{
            label: string;
            value: string;
        }>;
        custom?: (value: any) => string | undefined;
    };
}
export interface OrganizationProfilePage {
    id: string;
    label: string;
    icon?: ReactNode;
    component: ComponentType<any>;
    path?: string;
    enabled?: boolean;
    requiredPermissions?: string[];
}
export interface OrganizationProfileField {
    name: string;
    label: string;
    type: 'text' | 'email' | 'url' | 'textarea' | 'select' | 'checkbox' | 'file' | 'custom';
    component?: ComponentType<any>;
    required?: boolean;
    disabled?: boolean;
    placeholder?: string;
    helperText?: string;
    validation?: {
        required?: boolean;
        pattern?: RegExp;
        minLength?: number;
        maxLength?: number;
        fileTypes?: string[];
        maxFileSize?: number;
        options?: Array<{
            label: string;
            value: string;
        }>;
        custom?: (value: any) => string | undefined;
    };
}
export interface FormProps extends BaseComponentProps, Omit<FormHTMLAttributes<HTMLFormElement>, 'className' | 'style' | 'onError'> {
    onSubmit?: (data: any) => void | Promise<void>;
    onError?: (errors: Record<string, string>) => void;
    onValidate?: (data: any) => Record<string, string> | Promise<Record<string, string>>;
    loading?: boolean;
    disabled?: boolean;
    layout?: 'vertical' | 'horizontal' | 'inline';
    spacing?: 'sm' | 'md' | 'lg';
    validateOnChange?: boolean;
    validateOnBlur?: boolean;
    validateOnSubmit?: boolean;
    initialValues?: Record<string, any>;
    showSubmitButton?: boolean;
    showResetButton?: boolean;
    submitButtonText?: string;
    resetButtonText?: string;
    customActions?: ReactNode;
    customValidation?: ReactNode;
}
export interface InputProps extends BaseComponentProps, Omit<InputHTMLAttributes<HTMLInputElement>, 'className' | 'style' | 'size'> {
    label?: string;
    helperText?: string;
    errorText?: string;
    variant?: 'flat' | 'bordered' | 'underlined' | 'faded';
    size?: 'sm' | 'md' | 'lg';
    color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
    clearable?: boolean;
    password?: boolean;
    showPasswordToggle?: boolean;
    startIcon?: ReactNode;
    endIcon?: ReactNode;
    error?: boolean;
    success?: boolean;
    onClear?: () => void;
    onIconClick?: () => void;
}
export interface ButtonProps extends BaseComponentProps, Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'className' | 'style'> {
    variant?: 'solid' | 'bordered' | 'light' | 'flat' | 'faded' | 'shadow' | 'ghost';
    size?: 'sm' | 'md' | 'lg';
    color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
    loading?: boolean;
    disabled?: boolean;
    fullWidth?: boolean;
    startIcon?: ReactNode;
    endIcon?: ReactNode;
    iconOnly?: boolean;
    href?: string;
    external?: boolean;
    onClick?: () => void | Promise<void>;
}
export interface CardProps extends BaseComponentProps {
    variant?: 'shadow' | 'bordered' | 'flat';
    hoverable?: boolean;
    clickable?: boolean;
    header?: ReactNode;
    body?: ReactNode;
    footer?: ReactNode;
    padding?: 'none' | 'sm' | 'md' | 'lg';
    radius?: 'none' | 'sm' | 'md' | 'lg' | 'xl';
    onClick?: () => void;
}
export interface ModalProps extends BaseComponentProps {
    open?: boolean;
    onOpenChange?: (open: boolean) => void;
    size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | 'full';
    placement?: 'center' | 'top' | 'bottom';
    backdrop?: 'transparent' | 'opaque' | 'blur';
    closeOnBackdropClick?: boolean;
    closeOnEscape?: boolean;
    hideCloseButton?: boolean;
    isDismissable?: boolean;
    header?: ReactNode;
    body?: ReactNode;
    footer?: ReactNode;
    onClose?: () => void;
    onOpen?: () => void;
}
export interface AvatarProps extends BaseComponentProps {
    src?: string;
    alt?: string;
    name?: string;
    fallback?: ReactNode;
    size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
    color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
    bordered?: boolean;
    showFallback?: boolean;
    onClick?: () => void;
    onError?: () => void;
}
export interface DropdownProps extends BaseComponentProps {
    open?: boolean;
    onOpenChange?: (open: boolean) => void;
    placement?: 'top' | 'bottom' | 'left' | 'right' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end';
    closeOnSelect?: boolean;
    closeOnBlur?: boolean;
    disabled?: boolean;
    trigger?: ReactNode;
    content?: ReactNode;
    onClose?: () => void;
    onOpen?: () => void;
}
export interface ToastProps extends BaseComponentProps {
    title?: string;
    description?: string;
    type?: 'default' | 'success' | 'warning' | 'error' | 'info';
    duration?: number;
    closable?: boolean;
    showIcon?: boolean;
    action?: {
        label: string;
        onClick: () => void;
    };
    onClose?: () => void;
    onOpen?: () => void;
}
export interface LoadingProps extends BaseComponentProps {
    size?: 'xs' | 'sm' | 'md' | 'lg' | 'xl';
    color?: 'default' | 'primary' | 'secondary' | 'success' | 'warning' | 'danger';
    text?: string;
    variant?: 'spinner' | 'dots' | 'bars' | 'pulse';
}
export interface ErrorBoundaryProps extends BaseComponentProps {
    fallback?: ComponentType<{
        error: Error;
        retry: () => void;
    }>;
    onError?: (error: Error, errorInfo: any) => void;
    isolated?: boolean;
    resetOnPropsChange?: boolean;
    resetKeys?: any[];
}
export interface FrankAuthProviderProps extends BaseComponentProps {
    config: FrankAuthConfig;
    publishableKey?: string;
    organizationId?: XID;
    customConfig?: Partial<FrankAuthConfig>;
    debug?: boolean;
    onUserUpdate?: (user: User | null) => void;
    onSessionUpdate?: (session: Session | null) => void;
    onOrganizationUpdate?: (organization: Organization | null) => void;
    onError?: (error: Error) => void;
}
//# sourceMappingURL=component.d.ts.map