
#include "Switch81.hpp"

struct Switch81Widget : SwitchMatrixModuleWidget {
	static constexpr int hp = 6;

	Switch81Widget(Switch81* module) {
		setModule(module);
		box.size = Vec(RACK_GRID_WIDTH * hp, RACK_GRID_HEIGHT);
		setPanel(box.size, "Switch81");
		createScrews();

		// generated by svg_widgets.rb
		auto mix1ParamPosition = Vec(56.5, 33.0);
		auto mix2ParamPosition = Vec(56.5, 70.0);
		auto mix3ParamPosition = Vec(56.5, 107.0);
		auto mix4ParamPosition = Vec(56.5, 144.0);
		auto mix5ParamPosition = Vec(56.5, 181.0);
		auto mix6ParamPosition = Vec(56.5, 218.0);
		auto mix7ParamPosition = Vec(56.5, 255.0);
		auto mix8ParamPosition = Vec(56.5, 292.0);

		auto in1InputPosition = Vec(12.5, 30.0);
		auto in2InputPosition = Vec(12.5, 67.0);
		auto in3InputPosition = Vec(12.5, 104.0);
		auto in4InputPosition = Vec(12.5, 141.0);
		auto in5InputPosition = Vec(12.5, 178.0);
		auto in6InputPosition = Vec(12.5, 215.0);
		auto in7InputPosition = Vec(12.5, 252.0);
		auto in8InputPosition = Vec(12.5, 289.0);

		auto outOutputPosition = Vec(12.5, 321.0);
		// end generated by svg_widgets.rb

		createSwitch<InvertingIndicatorButton18>(mix1ParamPosition, module, Switch81::MIX1_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix2ParamPosition, module, Switch81::MIX2_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix3ParamPosition, module, Switch81::MIX3_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix4ParamPosition, module, Switch81::MIX4_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix5ParamPosition, module, Switch81::MIX5_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix6ParamPosition, module, Switch81::MIX6_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix7ParamPosition, module, Switch81::MIX7_PARAM);
		createSwitch<InvertingIndicatorButton18>(mix8ParamPosition, module, Switch81::MIX8_PARAM);

		addInput(createInput<Port24>(in1InputPosition, module, Switch81::IN1_INPUT));
		addInput(createInput<Port24>(in2InputPosition, module, Switch81::IN2_INPUT));
		addInput(createInput<Port24>(in3InputPosition, module, Switch81::IN3_INPUT));
		addInput(createInput<Port24>(in4InputPosition, module, Switch81::IN4_INPUT));
		addInput(createInput<Port24>(in5InputPosition, module, Switch81::IN5_INPUT));
		addInput(createInput<Port24>(in6InputPosition, module, Switch81::IN6_INPUT));
		addInput(createInput<Port24>(in7InputPosition, module, Switch81::IN7_INPUT));
		addInput(createInput<Port24>(in8InputPosition, module, Switch81::IN8_INPUT));

		addOutput(createOutput<Port24>(outOutputPosition, module, Switch81::OUT_OUTPUT));
	}
};

Model* modelSwitch81 = createModel<Switch81, Switch81Widget>("Bogaudio-Switch81", "SWITCH81", "8-channel mixer", "Mixer", "Polyphonic");
