<?xml version='1.0' encoding='UTF-8'?>
<!-- Created with Cambalache 0.96.3 -->
<interface>
  <!-- interface-name unit_file_panel.ui -->
  <!-- interface-description Unit file panel -->
  <requires lib="gio" version="2.0"/>
  <requires lib="gtk" version="4.18"/>
  <requires lib="libadwaita" version="1.7"/>
  <template class="UnitFilePanel" parent="GtkBox">
    <property name="orientation">vertical</property>
    <child>
      <object class="AdwViewStack" id="panel_file_stack">
        <property name="vexpand">True</property>
        <property name="vexpand-set">True</property>
        <child>
          <object class="AdwViewStackPage">
            <property name="child">
              <object class="GtkBox">
                <property name="orientation">vertical</property>
                <child>
                  <object class="GtkBox">
                    <property name="margin-bottom">5</property>
                    <property name="margin-end">5</property>
                    <property name="margin-start">5</property>
                    <property name="spacing">5</property>
                    <child>
                      <object class="GtkToggleButton" id="find_text_button">
                        <property name="icon-name">system-search-symbolic</property>
                      </object>
                    </child>
                    <child>
                      <object class="AdwToggleGroup" id="file_dropin_selector">
                        <child>
                          <object class="AdwToggle">
                            <property name="label">Unit File</property>
                            <property name="name">file</property>
                          </object>
                        </child>
                      </object>
                    </child>
                    <child>
                      <object class="GtkLinkButton" id="file_link">
                        <property name="halign">start</property>
                        <property name="hexpand">True</property>
                        <property name="label">link</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkMenuButton">
                        <property name="label">Drop-in</property>
                        <property name="menu-model">unit_file_menu</property>
                        <property name="tooltip-text">Drop-in operations</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkButton" id="save_button">
                        <property name="action-name">win.save-unit-file</property>
                        <property name="child">
                          <object class="AdwButtonContent">
                            <property name="halign">baseline-center</property>
                            <property name="icon-name">document-save</property>
                            <property name="label" translatable="yes" context="file" comments="button">Save</property>
                            <property name="valign">baseline-center</property>
                          </object>
                        </property>
                        <property name="css-classes">suggested-action</property>
                      </object>
                    </child>
                  </object>
                </child>
                <child>
                  <object class="GtkScrolledWindow" id="unit_file_scrolled_window">
                    <property name="vexpand">True</property>
                    <property name="vexpand-set">True</property>
                  </object>
                </child>
                <child>
                  <object class="GtkSearchBar" id="text_search_bar">
                    <property name="show-close-button">True</property>
                  </object>
                </child>
              </object>
            </property>
            <property name="name">file_panel</property>
          </object>
        </child>
        <child>
          <object class="AdwViewStackPage">
            <property name="child">
              <object class="AdwStatusPage">
                <property name="description" translatable="yes" context="file" comments="description">The unit has no file associated</property>
                <property name="icon-name">unreadable-symbolic</property>
                <property name="title" translatable="yes" context="file" comments="title">No Unit File</property>
              </object>
            </property>
            <property name="name">empty</property>
          </object>
        </child>
      </object>
    </child>
  </template>
  <menu id="unit_file_menu">
    <item>
      <attribute name="action">win.revert_unit_file_full</attribute>
      <attribute name="label" translatable="yes" context="menu" comments="Unit file drop-in operations menu item">Revert Drop-in</attribute>
    </item>
    <section>
      <attribute name="label" translatable="yes" context="menu" comments="Unit file drop-in operations menu section">Create Drop-in</attribute>
      <item>
        <attribute name="action">win.create_drop_in_file_permanent</attribute>
        <attribute name="label" translatable="yes" context="menu" comments="Unit file drop-in operations menu item">Permanent</attribute>
      </item>
      <item>
        <attribute name="action">win.create_drop_in_file_runtime</attribute>
        <attribute name="label" translatable="yes" context="menu" comments="Unit file drop-in operations menu item">Runtime</attribute>
      </item>
    </section>
  </menu>
</interface>
