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

import Foundation
import NitroModules

/// See ``HybridNitroBatterySpec``
public protocol HybridNitroBatterySpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getLevel() throws -> Double
  func isCharging() throws -> Bool
  func getBatteryState() throws -> String
  func isLowPowerModeEnabled() throws -> Bool
  func addBatteryStateListener(listener: @escaping (_ state: String) -> Void) throws -> Void
  func removeBatteryStateListener(listener: @escaping (_ state: String) -> Void) throws -> Void
  func addLowPowerListener(listener: @escaping () -> Void) throws -> Void
  func removeLowPowerListener(listener: @escaping () -> Void) throws -> Void
}

/// See ``HybridNitroBatterySpec``
open class HybridNitroBatterySpec_base {
  private weak var cxxWrapper: HybridNitroBatterySpec_cxx? = nil
  public init() { }
  public func getCxxWrapper() -> HybridNitroBatterySpec_cxx {
  #if DEBUG
    guard self is HybridNitroBatterySpec else {
      fatalError("`self` is not a `HybridNitroBatterySpec`! Did you accidentally inherit from `HybridNitroBatterySpec_base` instead of `HybridNitroBatterySpec`?")
    }
  #endif
    if let cxxWrapper = self.cxxWrapper {
      return cxxWrapper
    } else {
      let cxxWrapper = HybridNitroBatterySpec_cxx(self as! HybridNitroBatterySpec)
      self.cxxWrapper = cxxWrapper
      return cxxWrapper
    }
  }
}

/**
 * A Swift base-protocol representing the NitroBattery HybridObject.
 * Implement this protocol to create Swift-based instances of NitroBattery.
 * ```swift
 * class HybridNitroBattery : HybridNitroBatterySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNitroBatterySpec = HybridNitroBatterySpec_protocol & HybridNitroBatterySpec_base
