package com.isidroid.c23.ui.screen.print_jobs

import com.isidroid.c23.domain.dto.PrintJobListItem
import com.isidroid.core.vm.ViewEvent
import com.isidroid.core.vm.ViewSideEffect
import com.isidroid.core.vm.ViewState

class PrintJobsContract {
    sealed interface Event : ViewEvent {
        data object ToBack : Event
        data class ToDetails(val id: String) : Event
        data class ToSpot(val spotCode: String?) : Event
    }

    sealed interface Effect : ViewSideEffect {
        sealed interface Navigation : Effect {
            data object ToBack : Navigation
            data class ToDetails(val id: String) : Navigation
            data class ToMap(val lat: Double, val lng: Double) : Navigation
        }
    }

    data class State(
        val loading: Boolean = false,
        val jobs: List<PrintJobListItem>? = null,
    ) : ViewState
}