import{getLocaleFromPathname as a}from"@redocly/theme/core/utils";import{getLoginUrlWithRedirect as c}from"../utils.js";import{buildClientLoginUrl as g}from"../../../shared/urls.js";function m(t,n){const l=t.globalData.auth?.devLogin,e=t.getConfig().ssoDirect||{},o=Object.keys(e);if(l||o.length>1)return c(n);if(o.length===1){const r=e[o[0]],i=t.globalData.l10n;return g(o[0],r.type,a(n,i?.defaultLocale,i?.locales),t.loginUrls,n)}}export{m as getRedirectLoginUrl};
