#pragma once

#include "esphome/components/safe_mode/safe_mode.h"
#include "esphome/components/switch/switch.h"
#include "esphome/core/component.h"

namespace esphome::safe_mode {

class SafeModeSwitch final : public switch_::Switch, public Component {
 public:
  void dump_config() override;
  void set_safe_mode(SafeModeComponent *safe_mode_component);

 protected:
  SafeModeComponent *safe_mode_component_;
  void write_state(bool state) override;
};

}  // namespace esphome::safe_mode
