<?xml version="1.0" encoding="UTF-8"?>
<interface>
  <requires lib="gtk" version="4.0"/>
  <template class="VariableDataRow" parent="GtkBox">
    <property name="orientation">horizontal</property>
    <property name="spacing">12</property>
    <property name="margin-start">12</property>
    <property name="margin-end">12</property>
    <property name="margin-top">6</property>
    <property name="margin-bottom">6</property>

    <child>
      <object class="GtkBox" id="variable_cell">
        <property name="orientation">horizontal</property>
        <property name="spacing">6</property>
        <property name="width-request">150</property>

        <child>
          <object class="GtkEntry" id="name_entry">
            <property name="placeholder-text">Variable name</property>
            <property name="hexpand">True</property>
          </object>
        </child>
      </object>
    </child>

    <!-- Inline edit buttons (shown only when editing) -->
    <child>
      <object class="GtkRevealer" id="edit_buttons_revealer">
        <property name="transition-type">slide-left</property>
        <property name="reveal-child">False</property>
        <child>
          <object class="GtkBox">
            <property name="spacing">3</property>
            <child>
              <object class="GtkButton" id="cancel_button">
                <property name="icon-name">process-stop-symbolic</property>
                <property name="tooltip-text">Cancel editing</property>
                <signal name="clicked" handler="on_cancel_clicked"/>
                <style>
                  <class name="flat"/>
                </style>
              </object>
            </child>
            <child>
              <object class="GtkButton" id="save_button">
                <property name="icon-name">object-select-symbolic</property>
                <property name="tooltip-text">Save changes</property>
                <signal name="clicked" handler="on_save_clicked"/>
                <style>
                  <class name="flat"/>
                  <class name="suggested-action"/>
                </style>
              </object>
            </child>
          </object>
        </child>
      </object>
    </child>

    <child>
      <object class="GtkToggleButton" id="sensitive_toggle">
        <property name="icon-name">changes-allow-symbolic</property>
        <property name="tooltip-text">Mark as sensitive (store in keyring)</property>
        <signal name="toggled" handler="on_sensitive_toggled"/>
        <style>
          <class name="flat"/>
        </style>
      </object>
    </child>

    <child>
      <object class="GtkButton" id="delete_button">
        <property name="icon-name">edit-delete-symbolic</property>
        <property name="tooltip-text">Delete variable</property>
        <signal name="clicked" handler="on_delete_clicked"/>
        <style>
          <class name="flat"/>
        </style>
      </object>
    </child>

    <child>
      <object class="GtkBox" id="values_box">
        <property name="orientation">horizontal</property>
        <property name="spacing">6</property>
        <property name="hexpand">True</property>
      </object>
    </child>
  </template>
</interface>
