<?xml version="1.0" encoding="UTF-8"?>
<interface domain="easyeffects">
    <template class="EqualizerBox" parent="GtkBox">
        <property name="margin-start">6</property>
        <property name="margin-end">6</property>
        <property name="margin-top">6</property>
        <property name="margin-bottom">6</property>
        <property name="orientation">vertical</property>
        <child>
            <object class="GtkOverlay" id="overlay">
                <child type="overlay">
                    <object class="AdwToastOverlay" id="toast_overlay">
                        <property name="valign">start</property>
                    </object>
                </child>

                <child>
                    <object class="GtkBox">
                        <property name="spacing">12</property>
                        <property name="orientation">vertical</property>
                        <child>
                            <object class="GtkGrid">
                                <property name="halign">center</property>
                                <property name="row-spacing">6</property>
                                <property name="column-spacing">18</property>
                                <property name="margin-bottom">12</property>
                                <child>
                                    <object class="GtkLabel" id="nbands_label">
                                        <property name="label" translatable="yes">Bands</property>
                                        <layout>
                                            <property name="column">0</property>
                                            <property name="row">0</property>
                                        </layout>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkSpinButton" id="nbands">
                                        <property name="halign">center</property>
                                        <property name="digits">0</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="lower">1</property>
                                                <property name="upper">32</property>
                                                <property name="value">32</property>
                                                <property name="step-increment">1</property>
                                                <property name="page-increment">3</property>
                                            </object>
                                        </property>
                                        <layout>
                                            <property name="column">0</property>
                                            <property name="row">1</property>
                                        </layout>
                                        <accessibility>
                                            <relation name="labelled-by">nbands_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkLabel" id="mode_label">
                                        <property name="label" translatable="yes">Mode</property>
                                        <layout>
                                            <property name="column">1</property>
                                            <property name="row">0</property>
                                        </layout>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkComboBoxText" id="mode">
                                        <property name="halign">center</property>
                                        <items>
                                            <item translatable="yes" id="IIR">IIR</item>
                                            <item translatable="yes" id="FIR">FIR</item>
                                            <item translatable="yes" id="FFT">FFT</item>
                                            <item translatable="yes" id="SPM">SPM</item>
                                        </items>
                                        <layout>
                                            <property name="column">1</property>
                                            <property name="row">1</property>
                                        </layout>
                                        <accessibility>
                                            <relation name="labelled-by">mode_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkLabel" id="balance_label">
                                        <property name="label" translatable="yes">Balance</property>
                                        <layout>
                                            <property name="column">2</property>
                                            <property name="row">0</property>
                                        </layout>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkSpinButton" id="balance">
                                        <property name="halign">center</property>
                                        <property name="width-chars">11</property>
                                        <property name="digits">1</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="lower">-100</property>
                                                <property name="upper">100</property>
                                                <property name="step-increment">0.1</property>
                                                <property name="page-increment">1</property>
                                            </object>
                                        </property>
                                        <layout>
                                            <property name="column">2</property>
                                            <property name="row">1</property>
                                        </layout>
                                        <accessibility>
                                            <relation name="labelled-by">balance_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkLabel" id="pitch_left_label">
                                        <property name="label" translatable="yes">Pitch Left</property>
                                        <layout>
                                            <property name="column">3</property>
                                            <property name="row">0</property>
                                        </layout>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkSpinButton" id="pitch_left">
                                        <property name="halign">center</property>
                                        <property name="width-chars">11</property>
                                        <property name="digits">2</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="lower">-120</property>
                                                <property name="upper">120</property>
                                                <property name="step-increment">0.01</property>
                                                <property name="page-increment">0.1</property>
                                            </object>
                                        </property>
                                        <layout>
                                            <property name="column">3</property>
                                            <property name="row">1</property>
                                        </layout>
                                        <accessibility>
                                            <relation name="labelled-by">pitch_left_label</relation>
                                        </accessibility>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkLabel" id="pitch_right_label">
                                        <property name="label" translatable="yes">Pitch Right</property>
                                        <layout>
                                            <property name="column">4</property>
                                            <property name="row">0</property>
                                        </layout>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkSpinButton" id="pitch_right">
                                        <property name="halign">center</property>
                                        <property name="width-chars">11</property>
                                        <property name="digits">2</property>
                                        <property name="update-policy">if-valid</property>
                                        <property name="adjustment">
                                            <object class="GtkAdjustment">
                                                <property name="lower">-120</property>
                                                <property name="upper">120</property>
                                                <property name="step-increment">0.01</property>
                                                <property name="page-increment">0.1</property>
                                            </object>
                                        </property>
                                        <layout>
                                            <property name="column">4</property>
                                            <property name="row">1</property>
                                        </layout>
                                        <accessibility>
                                            <relation name="labelled-by">pitch_right_label</relation>
                                        </accessibility>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="spacing">12</property>
                                <child>
                                    <object class="GtkBox">
                                        <property name="spacing">6</property>
                                        <property name="hexpand">1</property>
                                        <property name="orientation">vertical</property>
                                        <child>
                                            <object class="GtkStackSwitcher" id="stack_switcher">
                                                <property name="halign">center</property>
                                                <property name="valign">center</property>
                                                <property name="stack">stack</property>
                                                <property name="visible" bind-source="split_channels" bind-property="active" bind-flags="sync-create" />
                                            </object>
                                        </child>

                                        <child>
                                            <object class="GtkStack" id="stack">
                                                <property name="hexpand">1</property>
                                                <property name="vexpand">1</property>
                                                <property name="transition-duration">250</property>
                                                <property name="transition-type">slide-left-right</property>
                                                <child>
                                                    <object class="GtkStackPage">
                                                        <property name="name">page_left_channel</property>
                                                        <property name="title" translatable="yes">Left</property>
                                                        <property name="child">
                                                            <object class="GtkScrolledWindow">
                                                                <child>
                                                                    <object class="GtkListView" id="listview_left">
                                                                        <property name="halign">center</property>
                                                                        <property name="orientation">horizontal</property>
                                                                        <property name="model">
                                                                            <object class="GtkNoSelection">
                                                                                <property name="model">
                                                                                    <object class="GtkStringList" id="string_list_left"></object>
                                                                                </property>
                                                                            </object>
                                                                        </property>
                                                                        <style>
                                                                            <class name="card" />
                                                                        </style>
                                                                    </object>
                                                                </child>
                                                            </object>
                                                        </property>
                                                    </object>
                                                </child>

                                                <child>
                                                    <object class="GtkStackPage">
                                                        <property name="name">page_right_channel</property>
                                                        <property name="title" translatable="yes">Right</property>
                                                        <property name="child">
                                                            <object class="GtkScrolledWindow">
                                                                <child>
                                                                    <object class="GtkListView" id="listview_right">
                                                                        <property name="halign">center</property>
                                                                        <property name="orientation">horizontal</property>
                                                                        <property name="model">
                                                                            <object class="GtkNoSelection">
                                                                                <property name="model">
                                                                                    <object class="GtkStringList" id="string_list_right"></object>
                                                                                </property>
                                                                            </object>
                                                                        </property>
                                                                        <style>
                                                                            <class name="card" />
                                                                        </style>
                                                                    </object>
                                                                </child>
                                                            </object>
                                                        </property>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkBox">
                                        <property name="spacing">18</property>
                                        <property name="orientation">vertical</property>
                                        <property name="valign">center</property>
                                        <child>
                                            <object class="GtkToggleButton" id="split_channels">
                                                <property name="valign">center</property>
                                                <property name="label" translatable="yes">Split Channels</property>
                                            </object>
                                        </child>

                                        <child>
                                            <object class="GtkButton" id="flat_response">
                                                <property name="label" translatable="yes">Flat Response</property>
                                                <property name="valign">center</property>
                                                <signal name="clicked" handler="on_flat_response" object="EqualizerBox" />
                                            </object>
                                        </child>

                                        <child>
                                            <object class="GtkButton" id="calculate_freqs">
                                                <property name="label" translatable="yes">Calculate Frequencies</property>
                                                <property name="valign">center</property>
                                                <signal name="clicked" handler="on_calculate_frequencies" object="EqualizerBox" />
                                            </object>
                                        </child>

                                        <child>
                                            <object class="GtkButton" id="sort_bands">
                                                <property name="label" translatable="yes">Sort Bands</property>
                                                <property name="valign">center</property>
                                                <signal name="clicked" handler="on_sort_bands" object="EqualizerBox" />
                                            </object>
                                        </child>

                                        <!-- Import EQ Presets Section -->
                                        <child>
                                            <object class="GtkBox">
                                                <property name="spacing">6</property>
                                                <property name="orientation">vertical</property>
                                                <property name="valign">center</property>

                                                <child>
                                                    <object class="GtkLabel">
                                                        <property name="label" translatable="yes">Import Preset</property>
                                                        <property name="valign">center</property>
                                                    </object>
                                                </child>

                                                <child>
                                                    <object class="GtkBox">
                                                        <property name="orientation">vertical</property>
                                                        <property name="valign">center</property>

                                                        <style>
                                                            <class name="linked" />
                                                        </style>

                                                        <child>
                                                            <object class="GtkButton" id="import_apo">
                                                                <property name="label">APO</property>
                                                                <property name="valign">center</property>
                                                                <signal name="clicked" handler="on_import_apo_preset_clicked" object="EqualizerBox" />
                                                            </object>
                                                        </child>

                                                        <child>
                                                            <object class="GtkButton" id="import_geq">
                                                                <property name="label">GraphicEQ</property>
                                                                <property name="valign">center</property>
                                                                <signal name="clicked" handler="on_import_geq_preset_clicked" object="EqualizerBox" />
                                                            </object>
                                                        </child>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="hexpand">1</property>
                                <property name="vexpand">0</property>
                                <property name="homogeneous">1</property>
                                <property name="spacing">6</property>
                                <child>
                                    <object class="GtkBox">
                                        <property name="hexpand">1</property>
                                        <property name="vexpand">0</property>
                                        <property name="spacing">6</property>
                                        <child>
                                            <object class="GtkLabel" id="input_level_title">
                                                <property name="halign">end</property>
                                                <property name="xalign">1</property>
                                                <property name="label" translatable="yes">Input</property>
                                            </object>
                                        </child>
                                        <child>
                                            <object class="GtkScale" id="input_gain">
                                                <property name="hexpand">1</property>
                                                <property name="valign">center</property>
                                                <property name="adjustment">
                                                    <object class="GtkAdjustment">
                                                        <property name="lower">-36</property>
                                                        <property name="upper">36</property>
                                                        <property name="step-increment">0.1</property>
                                                        <property name="page-increment">1</property>
                                                    </object>
                                                </property>
                                                <property name="draw-value">1</property>
                                                <property name="digits">1</property>
                                                <property name="value-pos">right</property>
                                                <accessibility>
                                                    <property name="label" translatable="yes">Plugin Input Gain</property>
                                                </accessibility>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkBox">
                                        <property name="orientation">vertical</property>
                                        <child>
                                            <object class="GtkBox">
                                                <property name="spacing">6</property>
                                                <child>
                                                    <object class="GtkLevelBar" id="input_level_left">
                                                        <property name="valign">center</property>
                                                        <property name="hexpand">1</property>
                                                    </object>
                                                </child>
                                                <child>
                                                    <object class="GtkLabel" id="input_level_left_label">
                                                        <property name="halign">end</property>
                                                        <property name="width-chars">4</property>
                                                        <property name="label">0</property>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                        <child>
                                            <object class="GtkBox">
                                                <property name="spacing">6</property>
                                                <child>
                                                    <object class="GtkLevelBar" id="input_level_right">
                                                        <property name="valign">center</property>
                                                        <property name="hexpand">1</property>
                                                    </object>
                                                </child>
                                                <child>
                                                    <object class="GtkLabel" id="input_level_right_label">
                                                        <property name="halign">end</property>
                                                        <property name="width-chars">4</property>
                                                        <property name="label">0</property>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="hexpand">1</property>
                                <property name="vexpand">0</property>
                                <property name="homogeneous">1</property>
                                <property name="spacing">6</property>
                                <child>
                                    <object class="GtkBox">
                                        <property name="hexpand">1</property>
                                        <property name="vexpand">0</property>
                                        <property name="spacing">6</property>
                                        <child>
                                            <object class="GtkLabel" id="output_level_title">
                                                <property name="halign">end</property>
                                                <property name="xalign">1</property>
                                                <property name="label" translatable="yes">Output</property>
                                            </object>
                                        </child>
                                        <child>
                                            <object class="GtkScale" id="output_gain">
                                                <property name="hexpand">1</property>
                                                <property name="valign">center</property>
                                                <property name="adjustment">
                                                    <object class="GtkAdjustment">
                                                        <property name="lower">-36</property>
                                                        <property name="upper">36</property>
                                                        <property name="step-increment">0.1</property>
                                                        <property name="page-increment">1</property>
                                                    </object>
                                                </property>
                                                <property name="draw-value">1</property>
                                                <property name="digits">1</property>
                                                <property name="value-pos">right</property>
                                                <accessibility>
                                                    <property name="label" translatable="yes">Plugin Output Gain</property>
                                                </accessibility>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                                <child>
                                    <object class="GtkBox">
                                        <property name="orientation">vertical</property>
                                        <child>
                                            <object class="GtkBox">
                                                <property name="spacing">6</property>
                                                <child>
                                                    <object class="GtkLevelBar" id="output_level_left">
                                                        <property name="valign">center</property>
                                                        <property name="hexpand">1</property>
                                                    </object>
                                                </child>
                                                <child>
                                                    <object class="GtkLabel" id="output_level_left_label">
                                                        <property name="halign">end</property>
                                                        <property name="width-chars">4</property>
                                                        <property name="label">0</property>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                        <child>
                                            <object class="GtkBox">
                                                <property name="spacing">6</property>
                                                <child>
                                                    <object class="GtkLevelBar" id="output_level_right">
                                                        <property name="valign">center</property>
                                                        <property name="hexpand">1</property>
                                                    </object>
                                                </child>
                                                <child>
                                                    <object class="GtkLabel" id="output_level_right_label">
                                                        <property name="halign">end</property>
                                                        <property name="width-chars">4</property>
                                                        <property name="label">0</property>
                                                    </object>
                                                </child>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                            </object>
                        </child>

                        <child>
                            <object class="GtkBox">
                                <property name="hexpand">1</property>
                                <property name="vexpand">0</property>
                                <property name="layout-manager">
                                    <object class="GtkBinLayout"></object>
                                </property>

                                <child>
                                    <object class="GtkButton" id="reset_button">
                                        <property name="halign">center</property>
                                        <property name="valign">center</property>
                                        <property name="hexpand">1</property>
                                        <property name="label" translatable="yes">Reset</property>
                                        <signal name="clicked" handler="on_reset" object="EqualizerBox" />
                                    </object>
                                </child>

                                <child>
                                    <object class="GtkBox">
                                        <property name="halign">end</property>
                                        <property name="hexpand">1</property>
                                        <property name="vexpand">0</property>
                                        <property name="spacing">6</property>
                                        <child>
                                            <object class="GtkLabel">
                                                <property name="halign">end</property>
                                                <property name="label" translatable="yes">Using</property>
                                            </object>
                                        </child>
                                        <child>
                                            <object class="GtkLabel">
                                                <property name="halign">end</property>
                                                <property name="label">Linux Studio Plugins</property>
                                                <attributes>
                                                    <attribute name="weight" value="bold" />
                                                </attributes>
                                            </object>
                                        </child>
                                    </object>
                                </child>
                            </object>
                        </child>
                    </object>
                </child>
            </object>
        </child>
    </template>

    <object class="GtkSizeGroup">
        <property name="mode">horizontal</property>
        <widgets>
            <widget name="input_level_title" />
            <widget name="output_level_title" />
        </widgets>
    </object>

    <object class="GtkSizeGroup">
        <property name="mode">horizontal</property>
        <widgets>
            <widget name="output_gain" />
            <widget name="input_gain" />
        </widgets>
    </object>
</interface>