///
/// HybridVideoPlayerSpec.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.*

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

  init {
    super.updateNative(mHybridData)
  }

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

  // Properties
  @get:DoNotStrip
  @get:Keep
  abstract val source: HybridVideoPlayerSourceSpec
  
  @get:DoNotStrip
  @get:Keep
  abstract val eventEmitter: HybridVideoPlayerEventEmitterSpec
  
  @get:DoNotStrip
  @get:Keep
  abstract val status: VideoPlayerStatus
  
  @get:DoNotStrip
  @get:Keep
  abstract val duration: Double
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var volume: Double
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var currentTime: Double
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var muted: Boolean
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var loop: Boolean
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var rate: Double
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var mixAudioMode: MixAudioMode
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var ignoreSilentSwitchMode: IgnoreSilentSwitchMode
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var playInBackground: Boolean
  
  @get:DoNotStrip
  @get:Keep
  @set:DoNotStrip
  @set:Keep
  abstract var playWhenInactive: Boolean
  
  @get:DoNotStrip
  @get:Keep
  abstract val isPlaying: Boolean
  
  @get:DoNotStrip
  @get:Keep
  abstract val selectedTrack: TextTrack?

  // Methods
  @DoNotStrip
  @Keep
  abstract fun replaceSourceAsync(source: HybridVideoPlayerSourceSpec?): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun getAvailableTextTracks(): Array<TextTrack>
  
  @DoNotStrip
  @Keep
  abstract fun selectTextTrack(textTrack: TextTrack?): Unit
  
  @DoNotStrip
  @Keep
  abstract fun initialize(): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun preload(): Promise<Unit>
  
  @DoNotStrip
  @Keep
  abstract fun play(): Unit
  
  @DoNotStrip
  @Keep
  abstract fun pause(): Unit
  
  @DoNotStrip
  @Keep
  abstract fun seekBy(time: Double): Unit
  
  @DoNotStrip
  @Keep
  abstract fun seekTo(time: Double): Unit

  private external fun initHybrid(): HybridData

  companion object {
    private const val TAG = "HybridVideoPlayerSpec"
  }
}
