#pragma once
#include <rack.hpp>

namespace MetaModule
{

enum Volume { Internal = 0, USB = 1, Card = 2 };
enum MappingMode { ALL = 0, LEFTRIGHT = 1, RIGHT = 2, LEFT = 3, CONNECTED = 4 };

// All user prefs persisted in Rack's plugin settings file.
struct PluginSettings {
	std::string wifiUrl = "";
	Volume wifiVolume = Volume::Card;

	// Defaults inherited by newly created hub modules:
	MappingMode defaultMappingMode = MappingMode::ALL;
	bool defaultUseGlueLabels = true;
	bool defaultUseBuiltinMidi = true;
	bool defaultAutoMapAudioOuts = false;

	void encodeJson(json_t *rootJ) const;
	void decodeJson(json_t *rootJ);
};

extern PluginSettings pluginSettings;

} // namespace MetaModule

extern rack::Plugin *pluginInstance;

//////////////// Auto generated ///////////////////////
// Add models below here
extern rack::Model *modelOctave;
extern rack::Model *modelNoise;
extern rack::Model *modelSHEV;
extern rack::Model *modelENVVCA;
extern rack::Model *modelDEV;
extern rack::Model *modelFreeverb;
extern rack::Model *modelVCAM;
extern rack::Model *modelTapo;
extern rack::Model *modelSISM;
extern rack::Model *modelSH;
extern rack::Model *modelSCM;
extern rack::Model *modelRCD;
extern rack::Model *modelQPLFO;
extern rack::Model *modelQCD;
extern rack::Model *modelPI;
extern rack::Model *modelPEG;
extern rack::Model *modelLPG;
extern rack::Model *modelL4;
extern rack::Model *modelDLD;
extern rack::Model *modelCLKM;
extern rack::Model *modelCLKD;
extern rack::Model *modelVerb;
extern rack::Model *modelSwitch41;
extern rack::Model *modelSwitch14;
extern rack::Model *modelSeq8;
extern rack::Model *modelProb8;
extern rack::Model *modelMNMX;
extern rack::Model *modelAtvert2;
extern rack::Model *modelBPF;
extern rack::Model *modelComplexEG;
extern rack::Model *modelDetune;
extern rack::Model *modelDjembe;
extern rack::Model *modelDrum;
extern rack::Model *modelEnOsc;
extern rack::Model *modelFM;
extern rack::Model *modelFollow;
extern rack::Model *modelGate;
extern rack::Model *modelHPF;
extern rack::Model *modelHubMedium;
extern rack::Model *modelKPLS;
extern rack::Model *modelMultiLFO;
extern rack::Model *modelPan;
extern rack::Model *modelPitchShift;
extern rack::Model *modelSlew;
extern rack::Model *modelSource;
extern rack::Model *modelStMix;
extern rack::Model *modelBWAVP;
extern rack::Model *modelMPEG;
extern rack::Model *modelMMAudioExpander;
extern rack::Model *modelMMButtonExpander;
