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

import NitroModules

/// See ``HybridOnePhotoLibrarySpec``
public protocol HybridOnePhotoLibrarySpec_protocol: HybridObject {
  // Properties


  // Methods
  func getAddPermissionStatus() throws -> PhotoLibraryPermissionStatus
  func requestAddPermission() throws -> Promise<PhotoLibraryPermissionStatus>
  func getReadPermissionStatus() throws -> PhotoLibraryPermissionStatus
  func requestReadPermission() throws -> Promise<PhotoLibraryPermissionStatus>
  func presentLimitedLibraryPicker() throws -> Promise<[String]>
  func listAssets(offset: Double, limit: Double) throws -> Promise<PhotoLibraryAssetPage>
  func getAsset(identifier: String) throws -> Promise<PhotoLibraryAsset>
  func listAlbums(offset: Double, limit: Double) throws -> Promise<PhotoLibraryAlbumPage>
  func getAlbum(identifier: String) throws -> Promise<PhotoLibraryAlbum>
  func createAlbum(title: String) throws -> Promise<String>
  func renameAlbum(identifier: String, title: String) throws -> Promise<Void>
  func listAlbumAssets(identifier: String, offset: Double, limit: Double) throws -> Promise<PhotoLibraryAssetPage>
  func addAssetToAlbum(albumIdentifier: String, assetIdentifier: String) throws -> Promise<Void>
  func removeAssetFromAlbum(albumIdentifier: String, assetIdentifier: String) throws -> Promise<Void>
  func deleteAlbum(identifier: String) throws -> Promise<Void>
  func setFavorite(identifier: String, favorite: Bool) throws -> Promise<Void>
  func deleteAsset(identifier: String) throws -> Promise<Void>
  func replaceImageContent(identifier: String, uri: String) throws -> Promise<Void>
  func replaceVideoContent(identifier: String, uri: String) throws -> Promise<Void>
  func revertAssetContent(identifier: String) throws -> Promise<Void>
  func exportOriginalAsset(identifier: String, allowNetwork: Bool) throws -> Promise<String>
  func exportCurrentImage(identifier: String, allowNetwork: Bool) throws -> Promise<String>
  func exportCurrentVideo(identifier: String, allowNetwork: Bool) throws -> Promise<String>
  func saveImage(uri: String) throws -> Promise<String>
  func saveVideo(uri: String) throws -> Promise<String>
}

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

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

/**
 * A Swift base-protocol representing the OnePhotoLibrary HybridObject.
 * Implement this protocol to create Swift-based instances of OnePhotoLibrary.
 * ```swift
 * class HybridOnePhotoLibrary : HybridOnePhotoLibrarySpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOnePhotoLibrarySpec = HybridOnePhotoLibrarySpec_protocol & HybridOnePhotoLibrarySpec_base
