import { type GuestUser, type User } from '@farfetch/blackout-client'; import React from 'react'; interface Props { children: React.ReactNode; fetchProfileOnTokenChanges: boolean; onProfileChange: (response: User | GuestUser) => void; } /** * Provides user profile state and a function to load it. Optionally, it can keep * the user profile data in sync with access token changes. The user profile state * data and loadProfile function will be accessible through the useUserProfile * hook. This provider depends on the AuthenticationProvider to work. * * @example Adding the UserProfileProvider to your app * ``` * * import \{ AuthenticationProvider, UserProfileProvider \} from '\@farfetch/blackout-react/authentication/contexts'; * import \{ useUserProfile \} from '\@farfetch/blackout-react/authentication/hooks'; * * const App = () =\> \{ * return (); * \} * * ``` * * @param props - Props for the provider. * * @returns An element that wraps the children with the UserProfileContext.Provider element. */ declare const UserProfileProvider: ({ children, fetchProfileOnTokenChanges, onProfileChange, }: Props) => JSX.Element; export default UserProfileProvider;