import type { ReactNode, RefObject } from 'react'; import type { NativeSyntheticEvent, StyleProp, ViewStyle } from 'react-native'; export type UserProfileCustomPageIcon = 'user' | 'profile' | 'security' | 'settings' | 'billing' | 'key' | 'lock' | 'email' | 'phone' | 'add' | 'switch' | 'users' | 'warning' | 'info' | 'globe' | 'folder' | 'book'; export type UserProfileSection = 'profile' | 'account'; export type UserProfileRow = 'manageAccount' | 'security' | 'switchAccount' | 'addAccount' | 'signOut'; export type UserProfileCustomPagePlacement = { type: 'sectionStart'; section: UserProfileSection; } | { type: 'sectionEnd'; section: UserProfileSection; } | { type: 'before'; row: UserProfileRow; } | { type: 'after'; row: UserProfileRow; }; interface UserProfileCustomDestinationBase { /** Unique path used to identify and navigate to the page. */ path: string; /** Text displayed in the native navigation title and, for root pages, the profile row. */ label: string; } interface UserProfileCustomPageBase extends UserProfileCustomDestinationBase { /** Icon displayed in the native user profile row. */ icon?: UserProfileCustomPageIcon; /** Where the row is inserted relative to Clerk's built-in rows. */ placement?: UserProfileCustomPagePlacement; } /** A custom page rendered from the root of the native user profile. */ export type UserProfileCustomPage = UserProfileCustomPageBase & ({ /** React Native content rendered when the row is selected. */ content: ReactNode; href?: never; } | { /** URL opened when the row is selected. */ href: string; content?: never; }); /** A custom destination reached by pushing from another custom user profile page. */ export type UserProfileCustomDestination = UserProfileCustomDestinationBase & { /** React Native content rendered when the destination is pushed. */ content: ReactNode; }; type UserProfileCustomRoute = UserProfileCustomPage | UserProfileCustomDestination; export type UserProfileCustomPageEvent = Readonly<{ type: 'presented' | 'dismissed'; path: string; }>; /** Navigation available to content rendered by a custom user profile page. */ export interface UserProfileCustomPageNavigation { /** Navigates back one screen in the native user profile. */ navigateBack: () => Promise; /** Returns to the root user profile screen. */ popToRoot: () => Promise; /** * Pushes another registered custom page or custom destination by path. * Rejects when that path is already active in the navigation stack. */ push: (path: string) => Promise; } export interface NativeUserProfileNavigationHandle { navigateCustomPage: (action: 'back' | 'popToRoot' | 'push', path?: string) => Promise; } /** Returns navigation actions for the currently rendered custom user profile destination. */ export declare function useUserProfileCustomPageNavigation(): UserProfileCustomPageNavigation; export declare function serializeUserProfileCustomPages(customPages: UserProfileCustomPage[], customDestinations?: UserProfileCustomDestination[]): string; export declare function useUserProfileCustomPages(customRoutes: UserProfileCustomRoute[], navigationHandleRef: RefObject): { navigation: UserProfileCustomPageNavigation; presentedPaths: ReadonlySet; onCustomPageEvent: (event: NativeSyntheticEvent) => void; }; export declare function UserProfileCustomPageHosts({ customRoutes, presentedPaths, navigation, style, }: { customRoutes: UserProfileCustomRoute[]; presentedPaths: ReadonlySet; navigation: UserProfileCustomPageNavigation; style?: StyleProp; }): import("react/jsx-runtime").JSX.Element[]; export {}; //# sourceMappingURL=UserProfileCustomPages.d.ts.map