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

package com.margelo.nitro.reactnativebundleupdate

import androidx.annotation.Keep
import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.margelo.nitro.core.Promise
import com.margelo.nitro.core.HybridObject

/**
 * A Kotlin class representing the ReactNativeBundleUpdate HybridObject.
 * Implement this abstract class to create Kotlin-based instances of ReactNativeBundleUpdate.
 */
@DoNotStrip
@Keep
@Suppress(
  "KotlinJniMissingFunction", "unused",
  "RedundantSuppression", "RedundantUnitReturnType", "SimpleRedundantLet",
  "LocalVariableName", "PropertyName", "PrivatePropertyName", "FunctionName"
)
abstract class HybridReactNativeBundleUpdateSpec: HybridObject() {
  @DoNotStrip
  private var mHybridData: HybridData = initHybrid()

  init {
    super.updateNative(mHybridData)
  }

  override fun updateNative(hybridData: HybridData) {
    mHybridData = hybridData
    super.updateNative(hybridData)
  }

  // Default implementation of `HybridObject.toString()`
  override fun toString(): String {
    return "[HybridObject ReactNativeBundleUpdate]"
  }

  // Properties
  

  // Methods
  @DoNotStrip
  @Keep
  abstract fun downloadBundle(params: BundleDownloadParams): Promise<BundleDownloadResult>
  
  @DoNotStrip
  @Keep
  abstract fun verifyBundle(params: BundleVerifyParams): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun verifyBundleASC(params: BundleVerifyASCParams): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun downloadBundleASC(params: BundleDownloadASCParams): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun installBundle(params: BundleInstallParams): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun clearDownload(): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun clearBundle(): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun clearAllJSBundleData(): Promise<TestResult>
  
  @DoNotStrip
  @Keep
  abstract fun resetToBuiltInBundle(): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun getFallbackUpdateBundleData(): Promise<Array<FallbackBundleInfo>>
  
  @DoNotStrip
  @Keep
  abstract fun setCurrentUpdateBundleData(params: BundleSwitchParams): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun getWebEmbedPath(): String
  
  @DoNotStrip
  @Keep
  abstract fun getWebEmbedPathAsync(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun getJsBundlePath(): String
  
  @DoNotStrip
  @Keep
  abstract fun getJsBundlePathAsync(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun getBackgroundJsBundlePath(): String
  
  @DoNotStrip
  @Keep
  abstract fun getBackgroundJsBundlePathAsync(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun getNativeAppVersion(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun getNativeBuildNumber(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun getBuiltinBundleVersion(): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun testVerification(): Promise<Boolean>
  
  @DoNotStrip
  @Keep
  abstract fun testSkipVerification(): Promise<Boolean>
  
  @DoNotStrip
  @Keep
  abstract fun isSkipGpgVerificationAllowed(): Boolean
  
  @DoNotStrip
  @Keep
  abstract fun isBundleExists(appVersion: String, bundleVersion: String): Promise<Boolean>
  
  @DoNotStrip
  @Keep
  abstract fun verifyExtractedBundle(appVersion: String, bundleVersion: String): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun listLocalBundles(): Promise<Array<LocalBundleInfo>>
  
  @DoNotStrip
  @Keep
  abstract fun listAscFiles(): Promise<Array<AscFileInfo>>
  
  @DoNotStrip
  @Keep
  abstract fun getSha256FromFilePath(filePath: String): Promise<String>
  
  @DoNotStrip
  @Keep
  abstract fun testDeleteJsBundle(appVersion: String, bundleVersion: String): Promise<TestResult>
  
  @DoNotStrip
  @Keep
  abstract fun testDeleteJsRuntimeDir(appVersion: String, bundleVersion: String): Promise<TestResult>
  
  @DoNotStrip
  @Keep
  abstract fun testDeleteMetadataJson(appVersion: String, bundleVersion: String): Promise<TestResult>
  
  @DoNotStrip
  @Keep
  abstract fun testWriteEmptyMetadataJson(appVersion: String, bundleVersion: String): Promise<TestResult>
  
  abstract fun addDownloadListener(callback: (event: BundleDownloadEvent) -> Unit): Double
  
  @DoNotStrip
  @Keep
  private fun addDownloadListener_cxx(callback: Func_void_BundleDownloadEvent): Double {
    val __result = addDownloadListener(callback)
    return __result
  }
  
  @DoNotStrip
  @Keep
  abstract fun removeDownloadListener(id: Double): Unit

  private external fun initHybrid(): HybridData

  companion object {
    protected const val TAG = "HybridReactNativeBundleUpdateSpec"
  }
}
