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

import NitroModules

/// See ``HybridOneMapServicesSpec``
public protocol HybridOneMapServicesSpec_protocol: HybridObject {
  // Properties


  // Methods
  func search(query: String, center: MapCoordinate, radiusMeters: Double) throws -> Promise<[MapPlace]>
  func autocomplete(query: String, center: MapCoordinate, radiusMeters: Double) throws -> Promise<[MapSuggestion]>
  func resolveSuggestion(id: String) throws -> Promise<MapPlace>
  func directions(origin: MapCoordinate, destination: MapCoordinate, transport: MapTransport) throws -> Promise<MapRoute>
}

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

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

/**
 * A Swift base-protocol representing the OneMapServices HybridObject.
 * Implement this protocol to create Swift-based instances of OneMapServices.
 * ```swift
 * class HybridOneMapServices : HybridOneMapServicesSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridOneMapServicesSpec = HybridOneMapServicesSpec_protocol & HybridOneMapServicesSpec_base
