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

import NitroModules

/// See ``HybridNativeCNContactSpec``
public protocol HybridNativeCNContactSpec_protocol: HybridObject {
  // Properties
  var identifier: String { get }

  // Methods
  func getContactName(key: ContactUINameKey) throws -> String
  func isKeyAvailable(key: String) throws -> Bool
  func mutableCopy() throws -> (any HybridNativeCNContactSpec)
  func setName(key: ContactUINameKey, value: String) throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the NativeCNContact HybridObject.
 * Implement this protocol to create Swift-based instances of NativeCNContact.
 * ```swift
 * class HybridNativeCNContact : HybridNativeCNContactSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNativeCNContactSpec = HybridNativeCNContactSpec_protocol & HybridNativeCNContactSpec_base
