#pragma once

#include <string>

#include "StateBase.hpp"
#include "Logger.hpp"
#include "TimerMgr.hpp"

class RecoveryState final : public StateBase
{
public:
	RecoveryState(std::string state_label, uint32_t timeout_min);
	void defineActionLabels() final;

private:
	enum Actions : uint8_t
	{
		getPosition       = 0,
		checkHealth,
		buildSBD,
		sendSBD,
		wait,
		lastAction
	};

	void enterThisState();
	void exitThisState(StateEvent event);
	void doStateActions(const StateEvent event) final;
	StateNames checkEvents(const StateEvent event) final;
	
	Actions doGetPosition();
	Actions doCheckHealth();
	Actions doBuildSBD();
	Actions doSendSBD();
	Actions doWait();
	
		
	std::string actionLabels[lastAction + 1];
	bool hitLastAction = false;
};
