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

import android.content.Intent
import eu.darken.bluemusic.monitor.core.alert.AlertType
import eu.darken.bluemusic.monitor.core.audio.DndMode
import java.time.Duration

sealed interface ConfigEvent {
    data object ShowDeleteDialog : ConfigEvent
    data class ShowRenameDialog(val currentName: String) : ConfigEvent
    data class ShowMonitoringDurationDialog(val currentValue: Duration) : ConfigEvent
    data class ShowReactionDelayDialog(val currentValue: Duration) : ConfigEvent
    data class ShowAdjustmentDelayDialog(val currentValue: Duration) : ConfigEvent
    data class ShowVolumeRateLimitIncreaseDialog(val currentValue: Duration) : ConfigEvent
    data class ShowVolumeRateLimitDecreaseDialog(val currentValue: Duration) : ConfigEvent
    data object ShowAutoplayKeycodesDialog : ConfigEvent
    data class ShowDndModeDialog(val currentMode: DndMode?) : ConfigEvent
    data class ShowConnectionAlertDialog(val currentType: AlertType, val currentSoundUri: String?) : ConfigEvent
    data object NavigateBack : ConfigEvent
    data object RequiresPro : ConfigEvent
    data class RequiresNotificationPolicyAccess(
        val intent: Intent,
        val feature: Feature
    ) : ConfigEvent {
        enum class Feature {
            RINGTONE,
            NOTIFICATION,
            DND
        }
    }
}