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

import NitroModules

/// See ``HybridFramePlaneSpec``
public protocol HybridFramePlaneSpec_protocol: HybridObject {
  // Properties
  var width: Double { get }
  var height: Double { get }
  var bytesPerRow: Double { get }
  var isValid: Bool { get }

  // Methods
  func getPixelBuffer() throws -> ArrayBuffer
}

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

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

/**
 * A Swift base-protocol representing the FramePlane HybridObject.
 * Implement this protocol to create Swift-based instances of FramePlane.
 * ```swift
 * class HybridFramePlane : HybridFramePlaneSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridFramePlaneSpec = HybridFramePlaneSpec_protocol & HybridFramePlaneSpec_base
