package cn.learningpad.oraltrainer.sdk

data class PlayerConfig @JvmOverloads constructor(
    val sentenceMode: Boolean = true,
    val defaultSeekStepMs: Long = 10_000L,
    val autoPlay: Boolean = false,
    val continuousPlayback: Boolean = true,
    val minPlaybackSpeed: Float = 0.5f,
    val maxPlaybackSpeed: Float = 2.0f,
    val gestureControls: GestureControlsConfig = GestureControlsConfig(),
)

data class GestureControlsConfig @JvmOverloads constructor(
    val enabled: Boolean = true,
    val tapTogglesPlayPause: Boolean = true,
    val leftSwipeAction: SwipeAction = SwipeAction.PREVIOUS_SENTENCE_OR_REWIND,
    val rightSwipeAction: SwipeAction = SwipeAction.NEXT_SENTENCE_OR_FORWARD,
    val minSwipeDistanceDp: Float = 48f,
    val minSwipeVelocityDpPerSecond: Float = 160f,
    val longPressAdjustsSpeed: Boolean = true,
    val longPressSlowSpeed: Float = 0.75f,
    val longPressSlowerSpeed: Float = 0.5f,
    val longPressFastSpeed: Float = 1.5f,
    val longPressFasterSpeed: Float = 2.0f,
)

enum class SwipeAction {
    NONE,
    REWIND,
    FORWARD,
    PREVIOUS_SENTENCE,
    NEXT_SENTENCE,
    PREVIOUS_SENTENCE_OR_REWIND,
    NEXT_SENTENCE_OR_FORWARD,
}

enum class LoopMode {
    OFF,
    ONE,
    ALL,
}
