package com.isidroid.c23.ui.screen.content

import android.net.Uri
import com.isidroid.core.vm.ViewEvent
import com.isidroid.core.vm.ViewSideEffect
import com.isidroid.core.vm.ViewState
import com.isidroid.spot.model.RichSpot

class ContentContract {
    sealed interface Event : ViewEvent {
        data class PickContent(val photo: Boolean = false, val documents: Boolean = false, val word: Boolean = false) : Event
        data class MultipleContents(val uris: List<Uri>) : Event
        data class OpenMap(val lat: Double? = null, val lng: Double? = null, val spotCode: String? = null) : Event
        data class CopyRenderedFilesToPublicFolder(val uri: Uri?) : Event
        data object GoBack : Event
        data object ToPrintJobList : Event
        data object CheckNotificationPermission : Event
        data object OpenDocumentTreeToCopyRenderedFiles : Event

    }

    sealed interface Effect : ViewSideEffect {
        data class RenderedFilesCopied(val count: Int) : Effect

        sealed interface Navigation : Effect {
            data class ToRenderPreview(val uris: String) : Navigation
            data class ToMap(val lat: Double? = null, val lng: Double? = null, val spotId: String? = null) : Navigation
            data object ToBack : Navigation
            data object ToPrintJobList : Navigation
        }
    }

    data class State(
        val hasNotificationPermission: Boolean? = null,
        val galleryHash: String? = null,
        val documentHash: String? = null,
        val wordHash: String? = null,
        val richSpot: RichSpot? = null,
        val documentTreeHash: String? = null

        ) : ViewState
}