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

import NitroModules

/// See ``HybridHapticSpec``
public protocol HybridHapticSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func isAvailable() throws -> Bool
  func notify(preset: HapticPreset) throws -> Void
  func play(pattern: HapticPattern) throws -> Void
}

public extension HybridHapticSpec_protocol {
  /// Default implementation of ``HybridObject.toString``
  func toString() -> String {
    return "[HybridObject Haptic]"
  }
}

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

/**
 * A Swift base-protocol representing the Haptic HybridObject.
 * Implement this protocol to create Swift-based instances of Haptic.
 * ```swift
 * class HybridHaptic : HybridHapticSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridHapticSpec = HybridHapticSpec_protocol & HybridHapticSpec_base
