import React__default from 'react';
import { StytchClientContext } from '../StytchClientContext.mjs';

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

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