#pragma once

#include <string>

#include "StateBase.hpp"
#include "StateVariables.hpp"
#include "Logger.hpp"

class SubmergeState final : public StateBase
{
public:
	SubmergeState(std::string label, uint32_t timeout_min);
	void defineActionLabels() final;

private:
	enum Actions : uint8_t
	{
		submerge   = 0,
		lastAction
	};

	void enterThisState();
	void exitThisState(StateEvent event);
	void doStateActions(const StateEvent event) final;
	StateNames checkEvents(const StateEvent event) final;
	
	Actions doSubmerge();
		
	std::string actionLabels[lastAction + 1];
	bool hitLastAction = false;
	
	const std::string stateLabel = "SubmergeState";
};
