<?xml version="1.0" encoding="UTF-8"?>
<interface>

  <object class="PicplannerOverview" id="overview_box">
    <property name="orientation">vertical</property>
  </object>

  <object class="PicplannerSun" id="sun_box">
    <property name="orientation">vertical</property>
  </object>

  <object class="PicplannerMoon" id="moon_box">
    <property name="orientation">vertical</property>
  </object>

  <object class="PicplannerMilkyway" id="milky_way_box">
    <property name="orientation">vertical</property>
  </object>

  <object class="GtkAdjustment" id="north_adjustment">
    <property name="upper">85.0511287798</property>
    <property name="lower">-85.0511287798</property>
    <property name="step_increment">0.01</property>
    <property name="page_increment">1</property>
  </object>
  <object class="GtkAdjustment" id="east_adjustment">
    <property name="upper">180</property>
    <property name="lower">-180</property>
    <property name="step_increment">0.01</property>
    <property name="page_increment">1</property>
  </object>

  <template class="PicplannerWindow" parent="AdwApplicationWindow">
    <property name="vexpand">true</property>
    <property name="valign">fill</property>
    <property name="content">
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <property name="vexpand">true</property>
        <property name="valign">fill</property>

        <child>
          <object class="AdwHeaderBar" id="header_bar">
            <property name="centering_policy">strict</property>

            <child type="title">
              <object class="AdwViewSwitcherTitle" id="switcher_title">
                <property name="hexpand">true</property>
                <property name="halign">fill</property>
                <property name="stack">stack</property>
                <property name="title">PicPlanner</property>
              </object>
            </child>
            <child type="start">
              <object class="GtkToggleButton" id="search_button">
                <property name="icon-name">edit-find-symbolic</property>
              </object>
            </child>
            <child type="end">
              <object class="GtkMenuButton">
                <property name="icon-name">open-menu-symbolic</property>
                <property name="menu-model">primary_menu</property>
              </object>
            </child>

          </object>
        </child>

        <child>
          <object class="GtkBox" id="box_main">
            <property name="orientation">vertical</property>
            <property name="vexpand">true</property>
            <property name="valign">fill</property>

            <child>
              <object class="GtkSearchBar" id="search_bar">
                <property name="visible">true</property>
                <property name="can_focus">true</property>
                <property name="search-mode-enabled">false</property>
                <property name="show-close-button">true</property>
                <child>
                  <object class="GtkBox">
                    <property name="orientation">vertical</property>
                    <property name="hexpand">true</property>
                    <child>
                      <object class="GtkSearchEntry" id="search_entry">
                        <property name="margin-top">2</property>
                        <property name="margin-start">10</property>
                        <property name="margin-end">10</property>
                        <property name="visible">true</property>
                        <property name="can-focus">true</property>
                        <property name="placeholder-text">Search... City, Region, Country</property>
                        <signal name="search-changed" handler="search_location"/>
                      </object>
                    </child>

										<child>
											<object class="AdwPreferencesPage">

												<child>
													<object class="AdwPreferencesGroup">

														<child>
															<object class="AdwExpanderRow">
																<property name="title">Coordinates</property>

																<child>
														      <object class="AdwActionRow">
														        <property name="title">North</property>
														        <child>
														          <object class="GtkSpinButton" id="north_entry">
														            <property name="halign">end</property>
														            <property name="adjustment">north_adjustment</property>
														            <property name="numeric">false</property>
														            <property name="wrap">true</property>
														            <property name="digits">4</property>
														          </object>
														        </child>
														      </object>
														    </child>

														    <child>
														      <object class="AdwActionRow">
														        <property name="title">East</property>
														        <child>
														          <object class="GtkSpinButton" id="east_entry">
														            <property name="halign">end</property>
														            <property name="adjustment">east_adjustment</property>
														            <property name="numeric">false</property>
														            <property name="wrap">true</property>
														            <property name="digits">4</property>
														          </object>
														        </child>
														      </object>
														    </child>

															</object>
														</child>

													</object>
												</child>

											</object>
										</child>

                  </object>
                </child>

              </object>
            </child>

            <child>
              <object class="GtkScrolledWindow" id="search_results_scroll">
                <property name="visible">false</property>
                <property name="hexpand">true</property>
                <property name="halign">fill</property>
                <property name="vexpand">true</property>
                <property name="valign">fill</property>

                <child>
                  <object class="AdwBin">
                    <property name="hexpand">true</property>
                    <property name="halign">fill</property>
                    <property name="vexpand">true</property>
                    <property name="valign">start</property>
                    <property name="margin-start">15</property>
                    <property name="margin-end">15</property>
                    <property name="margin-top">15</property>
                    <property name="margin-bottom">15</property>

                    <child>
                      <object class="GtkListBox" id="search_result_box">
                        <property name="hexpand">true</property>
                        <property name="halign">fill</property>
                        <property name="vexpand">true</property>
                        <property name="valign">fill</property>
                      </object>
                    </child>

                  </object>
                </child>

              </object>
            </child>

            <child>
              <object class="AdwViewStack" id="stack">
                <property name="vexpand">true</property>
                <property name="valign">fill</property>

                <child>
                  <object class="AdwViewStackPage" id="overview_page">
                    <property name="name">page1</property>
                    <property name="title">Overview</property>
                    <property name="child">overview_box</property>
                    <property name="icon-name">emoji-recent-symbolic</property>
                  </object>
                </child>
                <child>
                  <object class="AdwViewStackPage" id="sun_page">
                    <property name="name">page2</property>
                    <property name="title">Sun</property>
                    <property name="child">sun_box</property>
                    <property name="icon-name">weather-clear-symbolic</property>
                  </object>
                </child>
                <child>
                  <object class="AdwViewStackPage" id="moon_page">
                    <property name="name">page3</property>
                    <property name="title">Moon</property>
                    <property name="child">moon_box</property>
                    <property name="icon-name">weather-clear-night-symbolic</property>
                  </object>
                </child>
                <child>
                  <object class="AdwViewStackPage" id="milky_way_page">
                    <property name="name">page4</property>
                    <property name="title">Milky Way</property>
                    <property name="child">milky_way_box</property>
                    <property name="icon-name">milky-way-symbolic</property>
                  </object>
                </child>
              </object>
            </child>

            <child>
              <object class="AdwViewSwitcherBar">
                <property name="stack">stack</property>
                <binding name="reveal">
                  <lookup name="title-visible">switcher_title</lookup>
                </binding>
              </object>
            </child>

          </object>
        </child>


      </object>
    </property>
  </template>

  <menu id="primary_menu">
    <section>
      <item>
        <attribute name="label" translatable="yes">_Preferences</attribute>
        <attribute name="action">app.preferences</attribute>
      </item>
      <item>
        <attribute name="label" translatable="yes">_About PicPlanner</attribute>
        <attribute name="action">app.about</attribute>
      </item>
    </section>
  </menu>
</interface>
