package com.isidroid.c23.ui.screen.details

import com.isidroid.c23.domain.dto.PrintJobListItem
import com.isidroid.c23.ui.screen.content.ContentContract.Event
import com.isidroid.core.vm.ViewEvent
import com.isidroid.core.vm.ViewSideEffect
import com.isidroid.core.vm.ViewState

class JobDetailsContract {
    sealed interface Event : ViewEvent {
        data object ToBack : Event
        data object OpenConfirmationMapRoute: Event
        data object DismissBuildRouteConfirmation: Event
        data object OpenNavigationApp: Event
        data object LocationPermissionGranted: Event
        data object CheckNotificationPermission : Event

    }

    sealed interface Effect : ViewSideEffect {
        sealed interface Navigation : Effect {
            data object ToBack : Navigation
            data class ToNavigationApp(val lat: Double?, val lng: Double?) : Navigation
        }
    }

    data class State(
        val isLoading: Boolean = false,
        val printJob: PrintJobListItem? = null,
        val lat: Double? = null,
        val lng: Double? = null,
        val routeConfirmationVisible: Boolean = false,
        val requestLocationPermission: Boolean = false,
        val distance: String? = null,
        val renderProgress: Pair<Int, Int>? = null,
        val uploadProgress: Pair<Int, Int>? = null,
        val hasNotificationPermission: Boolean? = null,

    ) : ViewState
}