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

import NitroModules

/// See ``HybridPlacesSpec``
public protocol HybridPlacesSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func autocomplete(query: String, options: AutocompleteOptions?) throws -> Promise<[PlaceAutocompleteResult]>
  func getPlace(placeId: String, options: GetPlaceOptions?) throws -> Promise<Variant_NullType_PlaceDetails>
  func autocompleteWithDetails(query: String, options: AutocompleteOptions?) throws -> Promise<[PlaceDetails]>
}

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

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

/**
 * A Swift base-protocol representing the Places HybridObject.
 * Implement this protocol to create Swift-based instances of Places.
 * ```swift
 * class HybridPlaces : HybridPlacesSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridPlacesSpec = HybridPlacesSpec_protocol & HybridPlacesSpec_base
