import wn from '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import { StytchClientContext } from '../StytchClientContext.mjs';

const useStytchClient = ()=>{
    const client = wn.useContext(StytchClientContext).client;
    if (!client) {
        throw new Error('A Stytch client could not be found');
    }
    return client;
};

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