import useSWR from '../../../../../node_modules/swr/core/dist/index.mjs';
import { useStytchClient } from './useStytchClient.mjs';

const ssoGetConnectionsKey = (orgId)=>[
        'sso.getConnections',
        orgId
    ];
const useSsoConnections = ({ shouldFetch })=>{
    const client = useStytchClient();
    const orgId = client.organization.getSync()?.organization_id;
    return useSWR(shouldFetch ? ssoGetConnectionsKey(orgId) : null, ()=>{
        return client.sso.getConnections();
    });
};

export { ssoGetConnectionsKey, useSsoConnections };
//# sourceMappingURL=useSsoConnections.mjs.map
