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

import NitroModules

/// See ``HybridCameraFactorySpec``
public protocol HybridCameraFactorySpec_protocol: HybridObject {
  // Properties
  var cameraPermissionStatus: PermissionStatus { get }
  var microphonePermissionStatus: PermissionStatus { get }
  var supportsMultiCamSessions: Bool { get }

  // Methods
  func requestCameraPermission() throws -> Promise<Bool>
  func requestMicrophonePermission() throws -> Promise<Bool>
  func createCameraSession(enableMultiCam: Bool) throws -> Promise<(any HybridCameraSessionSpec)>
  func resolveConstraints(device: (any HybridCameraDeviceSpec), outputConfigurations: [CameraOutputConfiguration], constraints: [Constraint], requiresMultiCam: Bool?) throws -> Promise<(any HybridCameraSessionConfigSpec)>
  func createDeviceFactory() throws -> Promise<(any HybridCameraDeviceFactorySpec)>
  func createPhotoOutput(options: PhotoOutputOptions) throws -> (any HybridCameraPhotoOutputSpec)
  func createVideoOutput(options: VideoOutputOptions) throws -> (any HybridCameraVideoOutputSpec)
  func createFrameOutput(options: FrameOutputOptions) throws -> (any HybridCameraFrameOutputSpec)
  func createDepthFrameOutput(options: DepthFrameOutputOptions) throws -> (any HybridCameraDepthFrameOutputSpec)
  func createPreviewOutput() throws -> (any HybridCameraPreviewOutputSpec)
  func createObjectOutput(options: ObjectOutputOptions) throws -> (any HybridCameraObjectOutputSpec)
  func createOutputSynchronizer(outputs: [(any HybridCameraOutputSpec)]) throws -> (any HybridCameraOutputSynchronizerSpec)
  func createZoomGestureController() throws -> (any HybridZoomGestureControllerSpec)
  func createTapToFocusGestureController() throws -> (any HybridTapToFocusGestureControllerSpec)
  func createOrientationManager(orientationSource: OrientationSource) throws -> (any HybridOrientationManagerSpec)
  func createFrameRenderer() throws -> (any HybridFrameRendererSpec)
  func createNormalizedMeteringPoint(x: Double, y: Double, size: Double?) throws -> (any HybridMeteringPointSpec)
}

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

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

/**
 * A Swift base-protocol representing the CameraFactory HybridObject.
 * Implement this protocol to create Swift-based instances of CameraFactory.
 * ```swift
 * class HybridCameraFactory : HybridCameraFactorySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridCameraFactorySpec = HybridCameraFactorySpec_protocol & HybridCameraFactorySpec_base
