<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>

  <menu id="project_menu">
    <section>
      <item>
        <attribute name="label">Manage Environments</attribute>
        <attribute name="action">project.manage-environments</attribute>
      </item>
      <item>
        <attribute name="label">Add Request</attribute>
        <attribute name="action">project.add-request</attribute>
      </item>
      <item>
        <attribute name="label">Edit Project</attribute>
        <attribute name="action">project.edit</attribute>
      </item>
      <item>
        <attribute name="label">Delete</attribute>
        <attribute name="action">project.delete</attribute>
      </item>
    </section>
  </menu>

  <template class="ProjectItem" parent="GtkBox">
    <property name="orientation">vertical</property>
    <property name="spacing">0</property>

    <child>
      <object class="GtkBox" id="header_box">
        <property name="orientation">horizontal</property>
        <property name="spacing">6</property>
        <property name="margin-start">6</property>
        <property name="margin-end">6</property>
        <property name="margin-top">6</property>
        <property name="margin-bottom">6</property>

        <child>
          <object class="GtkImage" id="project_icon">
            <property name="icon-name">folder-symbolic</property>
          </object>
        </child>

        <child>
          <object class="GtkLabel" id="name_label">
            <property name="xalign">0</property>
            <property name="hexpand">True</property>
            <style>
              <class name="heading"/>
            </style>
          </object>
        </child>

        <child>
          <object class="GtkMenuButton">
            <property name="icon-name">view-more-symbolic</property>
            <property name="menu-model">project_menu</property>
            <style>
              <class name="flat"/>
            </style>
          </object>
        </child>
      </object>
    </child>

    <child>
      <object class="GtkRevealer" id="requests_revealer">
        <property name="reveal-child">False</property>
        <property name="transition-type">slide-down</property>

        <child>
          <object class="GtkListBox" id="requests_listbox">
            <property name="margin-start">12</property>
            <style>
              <class name="navigation-sidebar"/>
            </style>
          </object>
        </child>
      </object>
    </child>
  </template>
</interface>
