import '../../../../../node_modules/preact/compat/dist/compat.module.mjs';
import '../../../../../_virtual/index2.mjs';
import { useSWRConfig } from '../../../../../node_modules/swr/_internal/dist/index.mjs';
import { ssoGetConnectionsKey } from './useSsoConnections.mjs';
import { useStytchClient } from './useStytchClient.mjs';
import { useCallback as T } from '../../../../../node_modules/preact/hooks/dist/hooks.module.mjs';

const useRevalidateConnectionList = ()=>{
    const { mutate } = useSWRConfig();
    const client = useStytchClient();
    return T(()=>{
        const orgId = client.organization.getSync()?.organization_id;
        if (orgId) {
            return mutate(ssoGetConnectionsKey(orgId));
        }
    }, [
        client.organization,
        mutate
    ]);
};

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