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

package com.margelo.nitro.video

import androidx.annotation.Keep
import com.facebook.jni.HybridData
import com.facebook.proguard.annotations.DoNotStrip
import com.margelo.nitro.core.*
import dalvik.annotation.optimization.FastNative


/**
 * Represents the JavaScript callback `(payload: struct) => std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>`.
 * This can be either implemented in C++ (in which case it might be a callback coming from JS),
 * or in Kotlin/Java (in which case it is a native callback).
 */
@DoNotStrip
@Keep
@Suppress("ClassName", "RedundantUnitReturnType")
fun interface Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload: (OnGetLicensePayload) -> Promise<Promise<String>> {
  /**
   * Call the given JS callback.
   * @throws Throwable if the JS function itself throws an error, or if the JS function/runtime has already been deleted.
   */
  @DoNotStrip
  @Keep
  override fun invoke(payload: OnGetLicensePayload): Promise<Promise<String>>
}

/**
 * Represents the JavaScript callback `(payload: struct) => std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>`.
 * This is implemented in C++, via a `std::function<...>`.
 * The callback might be coming from JS.
 */
@DoNotStrip
@Keep
@Suppress(
  "KotlinJniMissingFunction", "unused",
  "RedundantSuppression", "RedundantUnitReturnType", "FunctionName",
  "ConvertSecondaryConstructorToPrimary", "ClassName", "LocalVariableName",
)
class Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload_cxx: Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload {
  @DoNotStrip
  @Keep
  private val mHybridData: HybridData

  @DoNotStrip
  @Keep
  private constructor(hybridData: HybridData) {
    mHybridData = hybridData
  }

  @DoNotStrip
  @Keep
  override fun invoke(payload: OnGetLicensePayload): Promise<Promise<String>>
    = invoke_cxx(payload)

  @FastNative
  private external fun invoke_cxx(payload: OnGetLicensePayload): Promise<Promise<String>>
}

/**
 * Represents the JavaScript callback `(payload: struct) => std::shared_ptr<Promise<std::shared_ptr<Promise<std::string>>>>`.
 * This is implemented in Java/Kotlin, via a `(OnGetLicensePayload) -> Promise<Promise<String>>`.
 * The callback is always coming from native.
 */
@DoNotStrip
@Keep
@Suppress("ClassName", "RedundantUnitReturnType", "unused")
class Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload_java(private val function: (OnGetLicensePayload) -> Promise<Promise<String>>): Func_std__shared_ptr_Promise_std__shared_ptr_Promise_std__string_____OnGetLicensePayload {
  @DoNotStrip
  @Keep
  override fun invoke(payload: OnGetLicensePayload): Promise<Promise<String>> {
    return this.function(payload)
  }
}
