<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2026, Jiri Eischmann <jiri@eischmann.cz> and the meshy contributors -->
<!-- SPDX-License-Identifier: GPL-3.0-or-later -->
<interface>
  <requires lib="gtk" version="4.0"/>
  <requires lib="libadwaita" version="1.0"/>
  <object class="AdwDialog" id="trace_path_dialog">
    <property name="title" translatable="yes">Trace Path</property>
    <property name="content-width">460</property>
    <property name="content-height">520</property>
    <property name="child">
      <object class="AdwToolbarView">
        <child type="top">
          <object class="AdwHeaderBar"/>
        </child>
        <property name="content">
          <object class="GtkScrolledWindow">
            <property name="hscrollbar-policy">never</property>
            <property name="vexpand">true</property>
            <child>
              <object class="GtkBox">
                <property name="orientation">vertical</property>
                <property name="spacing">8</property>
                <property name="margin-start">8</property>
                <property name="margin-end">8</property>
                <property name="margin-top">8</property>
                <property name="margin-bottom">8</property>
                <!-- Path input group -->
                <child>
                  <object class="AdwPreferencesGroup" id="path_group">
                    <property name="title" translatable="yes">Path</property>
                    <child>
                      <object class="AdwEntryRow" id="path_entry">
                        <property name="title" translatable="yes">Path</property>
                      </object>
                    </child>
                    <child>
                      <object class="AdwActionRow" id="map_row">
                        <property name="title" translatable="yes">Pick on Map</property>
                        <property name="subtitle" translatable="yes">Choose route on the map</property>
                        <property name="activatable">true</property>
                        <child type="prefix">
                          <object class="GtkImage">
                            <property name="icon-name">map-symbolic</property>
                          </object>
                        </child>
                        <child type="suffix">
                          <object class="GtkImage">
                            <property name="icon-name">go-next-symbolic</property>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
                <!-- Run button -->
                <child>
                  <object class="GtkButton" id="run_btn">
                    <property name="label" translatable="yes">Run Trace</property>
                    <property name="halign">center</property>
                    <style>
                      <class name="suggested-action"/>
                      <class name="pill"/>
                    </style>
                  </object>
                </child>
                <!-- Status box -->
                <child>
                  <object class="GtkBox" id="status_box">
                    <property name="spacing">8</property>
                    <property name="halign">center</property>
                    <property name="margin-top">4</property>
                    <property name="margin-bottom">4</property>
                    <child>
                      <object class="GtkSpinner" id="spinner">
                        <property name="visible">false</property>
                      </object>
                    </child>
                    <child>
                      <object class="GtkLabel" id="status_label">
                        <property name="label" translatable="yes">Enter path hashes and press Run Trace</property>
                        <property name="wrap">true</property>
                        <property name="justify">center</property>
                        <style>
                          <class name="dim-label"/>
                        </style>
                      </object>
                    </child>
                  </object>
                </child>
                <!-- Results group -->
                <child>
                  <object class="AdwPreferencesGroup" id="results_group">
                    <child>
                      <object class="GtkListBox" id="results_frame">
                        <property name="selection-mode">none</property>
                        <property name="visible">false</property>
                        <style>
                          <class name="boxed-list"/>
                        </style>
                        <child>
                          <object class="GtkListBoxRow">
                            <property name="activatable">false</property>
                            <property name="selectable">false</property>
                            <property name="child">
                              <object class="GtkBox" id="summary_box">
                                <property name="spacing">8</property>
                                <property name="margin-start">12</property>
                                <property name="margin-end">8</property>
                                <property name="margin-top">8</property>
                                <property name="margin-bottom">8</property>
                                <child>
                                  <object class="GtkLabel" id="summary_label">
                                    <property name="xalign">0</property>
                                    <property name="hexpand">true</property>
                                    <property name="wrap">true</property>
                                  </object>
                                </child>
                                <child>
                                  <object class="GtkButton" id="status_map_btn">
                                    <property name="icon-name">map-symbolic</property>
                                    <property name="valign">center</property>
                                    <property name="visible">false</property>
                                    <property name="tooltip-text" translatable="yes">Show on Map</property>
                                    <style>
                                      <class name="flat"/>
                                    </style>
                                  </object>
                                </child>
                              </object>
                            </property>
                          </object>
                        </child>
                        <child>
                          <object class="GtkListBoxRow">
                            <property name="activatable">false</property>
                            <property name="selectable">false</property>
                            <property name="child">
                              <object class="GtkBox" id="results_box">
                                <property name="orientation">vertical</property>
                                <property name="spacing">0</property>
                                <property name="margin-top">4</property>
                                <property name="margin-bottom">8</property>
                              </object>
                            </property>
                          </object>
                        </child>
                      </object>
                    </child>
                  </object>
                </child>
              </object>
            </child>
          </object>
        </property>
      </object>
    </property>
  </object>
</interface>
