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

import NitroModules

/// See ``HybridOneAppIconSpec``
public protocol HybridOneAppIconSpec_protocol: HybridObject {
  // Properties


  // Methods
  func isSupported() throws -> Promise<Bool>
  func getCurrentName() throws -> Promise<String?>
  func setIcon(name: String?) throws -> Promise<Void>
}

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

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

/**
 * A Swift base-protocol representing the OneAppIcon HybridObject.
 * Implement this protocol to create Swift-based instances of OneAppIcon.
 * ```swift
 * class HybridOneAppIcon : HybridOneAppIconSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneAppIconSpec = HybridOneAppIconSpec_protocol & HybridOneAppIconSpec_base
