<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 1.0 -->
<interface>
  <!-- interface-name unit_control_panel.ui -->
  <requires lib="gtk" version="4.18"/>
  <requires lib="libadwaita" version="1.7"/>
  <template class="UnitControlPanel" parent="GtkBox">
    <property name="orientation">vertical</property>
    <property name="spacing">5</property>
    <property name="vexpand">True</property>
    <property name="vexpand-set">True</property>
    <child>
      <object class="GtkBox">
        <property name="margin-end">5</property>
        <property name="margin-top">3</property>
        <property name="spacing">5</property>
        <child>
          <object class="GtkButton" id="favorite_button">
            <property name="action-name">win.favorite-toggle</property>
            <property name="css-classes">flat</property>
            <property name="icon-name">bookmark-outline-symbolic</property>
          </object>
        </child>
        <child>
          <object class="GtkLabel">
            <property name="css-classes">sbold</property>
            <property name="label" translatable="yes" context="control info">Enabled</property>
          </object>
        </child>
        <child>
          <object class="GtkSwitch" id="ablement_switch">
            <property name="sensitive">False</property>
            <property name="valign">baseline-center</property>
            <signal name="state-set" handler="switch_ablement_state_set" swapped="True"/>
          </object>
        </child>
        <child>
          <object class="AdwSplitButton" id="start_button">
            <property name="action-name">win.start-unit</property>
            <property name="dropdown-tooltip">Start Modes</property>
            <property name="popover">
              <object class="GtkPopover">
                <child>
                  <object class="GtkBox" id="start_modes">
                    <property name="orientation">vertical</property>
                  </object>
                </child>
              </object>
            </property>
            <property name="tooltip-text" translatable="yes" context="control tooltip">Start unit</property>
            <child>
              <object class="AdwButtonContent">
                <property name="icon-name">media-playback-start-symbolic</property>
                <property name="label" translatable="yes" context="controls" comments="The start button">_Start</property>
                <property name="use-underline">True</property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwSplitButton" id="stop_button">
            <property name="action-name">win.stop-unit</property>
            <property name="dropdown-tooltip" translatable="yes" context="control tooltip">Stop Modes</property>
            <property name="popover">
              <object class="GtkPopover">
                <child>
                  <object class="GtkBox" id="stop_modes">
                    <property name="orientation">vertical</property>
                  </object>
                </child>
              </object>
            </property>
            <property name="tooltip-text" translatable="yes" context="control tooltip">Stop unit</property>
            <child>
              <object class="AdwButtonContent">
                <property name="icon-name">process-stop</property>
                <property name="label" translatable="yes" context="controls">S_top</property>
                <property name="tooltip-text" translatable="yes" context="controls tooltip">Stop unit</property>
                <property name="use-underline">True</property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="AdwSplitButton" id="restart_button">
            <property name="action-name">win.restart-unit</property>
            <property name="dropdown-tooltip" translatable="yes" context="control tooltip">Restart Modes</property>
            <property name="popover">
              <object class="GtkPopover">
                <child>
                  <object class="GtkBox" id="restart_modes">
                    <property name="orientation">vertical</property>
                  </object>
                </child>
              </object>
            </property>
            <property name="tooltip-text" translatable="yes" context="controls tooltip">Restart unit</property>
            <child>
              <object class="AdwButtonContent">
                <property name="icon-name">view-refresh</property>
                <property name="label" translatable="yes" context="controls">Restart</property>
              </object>
            </child>
          </object>
        </child>
        <child>
          <object class="GtkBox">
            <property name="halign">end</property>
            <property name="hexpand">True</property>
            <child>
              <object class="GtkMenuButton" id="show_more_button">
                <property name="label">test</property>
                <property name="popover">
                  <object class="GtkPopover" id="more_action_popover"/>
                </property>
                <property name="tooltip-text" translatable="yes"/>
                <child>
                  <object class="AdwButtonContent">
                    <property name="can-shrink">True</property>
                    <property name="icon-name">dock-right-symbolic</property>
                    <property name="label" translatable="yes" context="controls menu">_More ...</property>
                    <property name="use-underline">True</property>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
    <child>
      <!--       <object class="AdwOverlaySplitView" id="side_overlay">
        <property name="collapsed">True</property>
        <property name="content"> -->
      <object class="GtkBox">
        <property name="orientation">vertical</property>
        <child>
          <object class="AdwViewSwitcher">
            <property name="css-classes">separator</property>
            <property name="margin-bottom">5</property>
            <property name="margin-end">5</property>
            <property name="policy">wide</property>
            <property name="stack">unit_panel_stack</property>
          </object>
        </child>
        <child>
          <object class="AdwViewStack" id="unit_panel_stack">
            <property name="vexpand">True</property>
            <property name="vexpand-set">True</property>
            <child>
              <object class="AdwViewStackPage">
                <property name="child">
                  <object class="UnitInfoPanel" id="unit_info_panel"/>
                </property>
                <property name="icon-name">emblem-documents-symbolic</property>
                <property name="name">info_page</property>
                <property name="title" translatable="yes" context="controls tab">Unit Info</property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="child">
                  <object class="UnitDependenciesPanel" id="unit_dependencies_panel"/>
                </property>
                <property name="icon-name">view-list-symbolic</property>
                <property name="name">dependencies_page</property>
                <property name="title" translatable="yes" context="controls tab">Dependencies</property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="child">
                  <object class="UnitFilePanel" id="unit_file_panel"/>
                </property>
                <property name="icon-name">text-x-generic-symbolic</property>
                <property name="name">definition_file_page</property>
                <property name="title" translatable="yes" context="controls tab">File</property>
              </object>
            </child>
            <child>
              <object class="AdwViewStackPage">
                <property name="child">
                  <object class="JournalPanel" id="unit_journal_panel"/>
                </property>
                <property name="icon-name">format-justify-fill</property>
                <property name="name">journal_page</property>
                <property name="title" translatable="yes" context="controls tab">Journal</property>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
