///
/// HybridOneBrightnessSpec.hpp
/// This file was generated by nitrogen. DO NOT MODIFY THIS FILE.
/// https://github.com/mrousavy/nitro
/// Copyright © Marc Rousavy @ Margelo
///

#pragma once

#if __has_include(<NitroModules/HybridObject.hpp>)
#include <NitroModules/HybridObject.hpp>
#else
#error NitroModules cannot be found! Are you sure you installed NitroModules properly?
#endif

// Forward declaration of `BrightnessMode` to properly resolve imports.
namespace margelo::nitro::one { enum class BrightnessMode; }
// Forward declaration of `BrightnessPermissionResponse` to properly resolve imports.
namespace margelo::nitro::one { struct BrightnessPermissionResponse; }
// Forward declaration of `BrightnessEvent` to properly resolve imports.
namespace margelo::nitro::one { struct BrightnessEvent; }

#include <NitroModules/Promise.hpp>
#include "BrightnessMode.hpp"
#include "BrightnessPermissionResponse.hpp"
#include <functional>
#include "BrightnessEvent.hpp"

namespace margelo::nitro::one {

  using namespace margelo::nitro;

  /**
   * An abstract base class for `OneBrightness`
   * Inherit this class to create instances of `HybridOneBrightnessSpec` in C++.
   * You must explicitly call `HybridObject`'s constructor yourself, because it is virtual.
   * @example
   * ```cpp
   * class HybridOneBrightness: public HybridOneBrightnessSpec {
   * public:
   *   HybridOneBrightness(...): HybridObject(TAG) { ... }
   *   // ...
   * };
   * ```
   */
  class HybridOneBrightnessSpec: public virtual HybridObject {
    public:
      // Constructor
      explicit HybridOneBrightnessSpec(): HybridObject(TAG) { }

      // Destructor
      ~HybridOneBrightnessSpec() override = default;

    public:
      // Properties
      

    public:
      // Methods
      virtual std::shared_ptr<Promise<double>> get() = 0;
      virtual std::shared_ptr<Promise<void>> set(double value) = 0;
      virtual std::shared_ptr<Promise<double>> getSystem() = 0;
      virtual std::shared_ptr<Promise<void>> setSystem(double value) = 0;
      virtual std::shared_ptr<Promise<BrightnessMode>> getSystemMode() = 0;
      virtual std::shared_ptr<Promise<void>> setSystemMode(BrightnessMode mode) = 0;
      virtual std::shared_ptr<Promise<bool>> isUsingSystem() = 0;
      virtual std::shared_ptr<Promise<void>> restoreSystem() = 0;
      virtual std::shared_ptr<Promise<BrightnessPermissionResponse>> getPermissions() = 0;
      virtual std::shared_ptr<Promise<BrightnessPermissionResponse>> requestPermissions() = 0;
      virtual bool isAvailable() = 0;
      virtual std::function<void()> addListener(const std::function<void(const BrightnessEvent& /* event */)>& listener) = 0;

    protected:
      // Hybrid Setup
      void loadHybridMethods() override;

    protected:
      // Tag for logging
      static constexpr auto TAG = "OneBrightness";
  };

} // namespace margelo::nitro::one
