<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <template class="Login" parent="AdwBin">
    <child>
      <object class="AdwToolbarView">
        <child type="top">
          <object class="AdwHeaderBar">
            <property name="show-title">False</property>
            <child type="start">
              <object class="GtkButton" id="back_button">
                <property name="icon-name">go-previous-symbolic</property>
                <signal name="clicked" handler="go_previous" swapped="yes"/>
                <property name="tooltip-text" translatable="yes">Back</property>
                <accessibility>
                  <property name="label" translatable="yes">Back</property>
                </accessibility>
              </object>
            </child>
            <style>
              <class name="flat"/>
            </style>
          </object>
        </child>
        <property name="content">
          <object class="GtkBox">
            <property name="orientation">vertical</property>
            <child>
              <object class="AdwBanner" id="offline_banner"/>
            </child>
            <child>
              <object class="GtkStack" id="main_stack">
                <property name="transition-type">crossfade</property>
                <property name="vexpand">True</property>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">homeserver</property>
                    <property name="child">
                      <object class="LoginHomeserverPage" id="homeserver_page">
                        <property name="login">Login</property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">method</property>
                    <property name="child">
                      <object class="LoginMethodPage" id="method_page">
                        <property name="login">Login</property>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">sso</property>
                    <property name="child">
                      <object class="LoginSsoPage" id="sso_page"/>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">loading</property>
                    <property name="child">
                      <object class="Spinner" id="loading_page">
                        <property name="valign">center</property>
                        <property name="halign">center</property>
                        <style>
                          <class name="session-loading-spinner"/>
                        </style>
                      </object>
                    </property>
                  </object>
                </child>
                <child>
                  <object class="GtkStackPage">
                    <property name="name">completed</property>
                    <property name="child">
                      <object class="AdwClamp">
                        <property name="maximum-size">400</property>
                        <property name="tightening-threshold">300</property>
                        <property name="child">
                          <object class="GtkBox">
                            <property name="orientation">vertical</property>
                            <property name="spacing">18</property>
                            <property name="valign">center</property>
                            <child>
                              <object class="GtkLabel">
                                <property name="wrap">True</property>
                                <property name="wrap-mode">word-char</property>
                                <property name="justify">center</property>
                                <property name="label" translatable="yes">Login Complete</property>
                                <style>
                                  <class name="title-1"/>
                                </style>
                              </object>
                            </child>
                            <child>
                              <object class="GtkPicture">
                                <property name="file">resource:///org/gnome/Fractal/assets/setup-complete.svg</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkLabel">
                                <property name="wrap">True</property>
                                <property name="wrap-mode">word-char</property>
                                <property name="justify">center</property>
                                <property name="label" translatable="yes">This session is ready to send and receive secure messages.</property>
                              </object>
                            </child>
                            <child>
                              <object class="GtkButton" id="done_button">
                                <property name="can-shrink">true</property>
                                <property name="label" translatable="yes">Start Chatting</property>
                                <property name="halign">center</property>
                                <signal name="clicked" handler="finish_login" swapped="yes"/>
                                <style>
                                  <class name="suggested-action"/>
                                  <class name="pill"/>
                                </style>
                              </object>
                            </child>
                          </object>
                        </property>
                      </object>
                    </property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </property>
      </object>
    </child>
  </template>
</interface>
