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

import NitroModules

/// See ``HybridNativePlatformSpec``
public protocol HybridNativePlatformSpec_protocol: HybridObject {
  // Properties
  

  // Methods
  func getInsets() throws -> Insets
  func getColorScheme() throws -> ColorScheme
  func getFontScale() throws -> Double
  func getPixelRatio() throws -> Double
  func getOrientation() throws -> Orientation
  func getContentSizeCategory() throws -> String
  func getScreenDimensions() throws -> Dimensions
  func getStatusBarDimensions() throws -> Dimensions
  func getNavigationBarDimensions() throws -> Dimensions
  func getPrefersRtlDirection() throws -> Bool
  func setRootViewBackgroundColor(color: Double) throws -> Void
  func setNavigationBarHidden(isHidden: Bool) throws -> Void
  func setStatusBarHidden(isHidden: Bool) throws -> Void
  func setImmersiveMode(isEnabled: Bool) throws -> Void
  func getMiniRuntime() throws -> UnistylesNativeMiniRuntime
  func registerPlatformListener(callback: @escaping (_ dependencies: [UnistyleDependency], _ miniRuntime: UnistylesNativeMiniRuntime) -> Void) throws -> Void
  func registerImeListener(callback: @escaping (_ miniRuntime: UnistylesNativeMiniRuntime) -> Void) throws -> Void
  func unregisterPlatformListeners() throws -> Void
}

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

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

/**
 * A Swift base-protocol representing the NativePlatform HybridObject.
 * Implement this protocol to create Swift-based instances of NativePlatform.
 * ```swift
 * class HybridNativePlatform : HybridNativePlatformSpec {
 *   // ...
 * }
 * ```
 */
public typealias HybridNativePlatformSpec = HybridNativePlatformSpec_protocol & HybridNativePlatformSpec_base
