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

import NitroModules

/// See ``HybridCameraPhotoOutputSpec``
public protocol HybridCameraPhotoOutputSpec_protocol: HybridObject, HybridCameraOutputSpec_protocol {
  // Properties
  var supportsDepthDataDelivery: Bool { get }
  var supportsCameraCalibrationDataDelivery: Bool { get }

  // Methods
  func capturePhoto(settings: CapturePhotoSettings, callbacks: CapturePhotoCallbacks) throws -> Promise<(any HybridPhotoSpec)>
  func capturePhotoToFile(settings: CapturePhotoSettings, callbacks: CapturePhotoCallbacks) throws -> Promise<PhotoFile>
  func prepareSettings(settings: [CapturePhotoSettings]) throws -> Promise<Void>
}

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

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

/**
 * A Swift base-protocol representing the CameraPhotoOutput HybridObject.
 * Implement this protocol to create Swift-based instances of CameraPhotoOutput.
 * ```swift
 * class HybridCameraPhotoOutput : HybridCameraPhotoOutputSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridCameraPhotoOutputSpec = HybridCameraPhotoOutputSpec_protocol & HybridCameraPhotoOutputSpec_base
