package eu.darken.bluemusic.devices.ui.config

import eu.darken.bluemusic.monitor.core.alert.AlertType
import eu.darken.bluemusic.monitor.core.audio.AudioStream
import eu.darken.bluemusic.monitor.core.audio.DndMode
import java.time.Duration

sealed interface ConfigAction {
    data class OnToggleVolume(
        val type: AudioStream.Type,
    ) : ConfigAction

    data object OnToggleAutoPlay : ConfigAction
    data object OnEditAutoplayKeycodesClicked : ConfigAction
    data class OnEditAutoplayKeycodes(val keycodes: List<Int>) : ConfigAction
    data object OnToggleVolumeLock : ConfigAction
    data object OnToggleVolumeObserving : ConfigAction
    data object OnToggleVolumeSaveOnDisconnect : ConfigAction
    data object OnToggleVolumeRateLimiter : ConfigAction
    data object OnToggleKeepAwake : ConfigAction
    data object OnToggleNudgeVolume : ConfigAction
    data object OnToggleVisibleAdjustments : ConfigAction
    data object OnToggleShowHomeScreen : ConfigAction
    data object OnLaunchAppClicked : ConfigAction
    data object OnEditMonitoringDurationClicked : ConfigAction
    data object OnEditReactionDelayClicked : ConfigAction
    data object OnEditAdjustmentDelayClicked : ConfigAction
    data object OnEditVolumeRateLimitIncreaseClicked : ConfigAction
    data object OnEditVolumeRateLimitDecreaseClicked : ConfigAction
    data object OnRenameClicked : ConfigAction
    data class DeleteDevice(val confirmed: Boolean = false) : ConfigAction
    data class OnEditMonitoringDuration(val duration: Duration?) : ConfigAction
    data class OnEditReactionDelay(val delay: Duration?) : ConfigAction
    data class OnEditAdjustmentDelay(val delay: Duration?) : ConfigAction
    data class OnEditVolumeRateLimitIncrease(val duration: Duration?) : ConfigAction
    data class OnEditVolumeRateLimitDecrease(val duration: Duration?) : ConfigAction
    data class OnRename(val newName: String?) : ConfigAction
    data class OnConfirmDelete(val confirmed: Boolean) : ConfigAction
    data object OnToggleEnabled : ConfigAction
    data object OnEditDndModeClicked : ConfigAction
    data class OnEditDndMode(val mode: DndMode?) : ConfigAction
    data object OnEditConnectionAlertClicked : ConfigAction
    data class OnEditConnectionAlertType(val type: AlertType) : ConfigAction
    data class OnEditConnectionAlertSoundUri(val uri: String?) : ConfigAction
}