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

import NitroModules

/// See ``HybridThorViewSpec``
public protocol HybridThorViewSpec_protocol: HybridObject, HybridView {
  // Properties
  var shapes: [ThorShape] { get set }
  var backend: ThorBackend? { get set }

  // Methods
  func drawShapes(shapes: [ThorShape]) throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the ThorView HybridObject.
 * Implement this protocol to create Swift-based instances of ThorView.
 * ```swift
 * class HybridThorView : HybridThorViewSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridThorViewSpec = HybridThorViewSpec_protocol & HybridThorViewSpec_base
