import { useSyncExternalStore as Cn } from '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { useStytch } from '../b2c/GlobalContextProvider.mjs';

// useStytchUser is a very lightweight copy-pasta of the hook from stytch-react
// If we end up calling this in several places, consider hoisting to global context
const useStytchUser = ()=>{
    const stytch = useStytch();
    return Cn(stytch.onStateChange, ()=>stytch.user.getSync());
};

export { useStytchUser };
//# sourceMappingURL=useStytchUser.mjs.map
