#pragma once
#include "../../../Layer1Reactive/Layer1FSM/Behaviors/Protoss/CorsairHarassmentBehavior.h"
#include "../../Interface/Actions/Harass.h"
#include "../../../../Utils/Process/ProcessContainer.h"
#include "L2GroupTacticalAction.h"

class L2Harass : public virtual Harass, public L2GroupTacticalAction
{
public:
  L2Harass(const Process* parent, unsigned int priority, const PersistentUnitGroup* initialGroup, Location* location);

protected:
  virtual void onStartImplementation();
  virtual void onCancelImplementation();
  virtual void onEndImplementation();

  virtual void onUnitAddedToGroup(void*, BWAPI::Unit* unit);
  virtual void onUnitRemovedFromGroup(void*, BWAPI::Unit* unit);

  void onHarassmentBehaviorTerminated(void*);

  ProcessContainerList<CorsairHarassmentBehavior> m_harassmentBehaviors;
  EVENT_HANDLER(L2Harass, onHarassmentBehaviorTerminated) m_onHarassmentBehaviorTerminated;
};
