// SPDX-License-Identifier: GPL-3.0-or-later
// Copyright (C) 2026 Andrea De Murtas

#pragma once

#include <juce_audio_processors/juce_audio_processors.h>

// Parameter IDs. Frozen at first public release: hosts store automation by ID.
// camelCase is the house style shared with Galdr and Gala. `outTrim` rather
// than `outGain` so it pairs visibly with `inTrim`: both are trims, not gains.
namespace pid
{
    // input
    inline constexpr auto inTrim = "inTrim";

    // noise gate
    inline constexpr auto gateOn     = "gateOn";
    inline constexpr auto gateThresh = "gateThresh";

    // pedal
    inline constexpr auto pedalOn    = "pedalOn";
    inline constexpr auto pedalMode  = "pedalMode";
    inline constexpr auto pedalDrive = "pedalDrive";
    inline constexpr auto pedalTone  = "pedalTone";
    inline constexpr auto pedalLevel = "pedalLevel";

    // amp
    inline constexpr auto ampGain  = "ampGain";
    inline constexpr auto tight    = "tight";
    inline constexpr auto bass     = "bass";
    inline constexpr auto mid      = "mid";
    inline constexpr auto treble   = "treble";
    inline constexpr auto presence = "presence";
    inline constexpr auto master   = "master";

    // cabinet and output
    inline constexpr auto cabMode = "cabMode";
    inline constexpr auto frost   = "frost";
    inline constexpr auto outTrim = "outTrim";
    inline constexpr auto quality = "quality";
}

// Choice parameter orderings, frozen alongside the IDs: a host stores a choice
// as an index, so inserting an entry anywhere but the end breaks sessions.
namespace choices
{
    enum class PedalMode { dist = 0, chainsaw, fuzz };
    enum class CabMode   { w412 = 0, practice, boombox, ir, off };
    enum class Quality   { eco = 0, full };

    inline const juce::StringArray pedalModes { "Dist", "Chainsaw", "Fuzz" };
    inline const juce::StringArray cabModes   { "4x12", "Practice", "Boombox", "User IR", "Off" };
    inline const juce::StringArray qualities  { "Eco", "Full" };
}

// Non-automatable state carried on the APVTS tree rather than as a parameter:
// a file path is not something a host can sensibly automate or interpolate.
namespace prop
{
    inline constexpr auto irPath     = "irPath";
    inline constexpr auto presetName = "presetName";
}

juce::AudioProcessorValueTreeState::ParameterLayout createGjallaParameterLayout();
