import*as t from"react";import s from"styled-components";import{Button as l}from"@redocly/theme/components/Button/Button";import{H2 as m}from"@redocly/theme/components/Typography/H2";import{getPathnameForLocale as p}from"@redocly/theme/core/utils";import{buildLoginUrl as d}from"../../../../utils/auth/build-login-url";import{usePageProps as f}from"../../../providers/page-data/hooks";import{useL10nConfig as u}from"../../hooks";function w(){const o=f()?.authIdps||[],{defaultLocale:r,locales:a,currentLocale:n}=u(),[i,c]=t.useState();return t.useEffect(()=>{const e=new URLSearchParams(window.location.search);c(e.get("redirectTo")||void 0)},[]),t.createElement(g,null,t.createElement(m,{"data-cy":"login-title"},"Choose login method"),o.map(e=>t.createElement("div",{key:e.idpId},t.createElement(l,{size:"large",to:d(e.idpId,p("",r,n,a),i)},e.title||e.type))))}const g=s.div`
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-family: var(--font-family-base);
  gap: var(--spacing-base);

  a {
    text-decoration: none;
  }
`;export{w as default};
