package com.example.modifier.ui.backup

import androidx.lifecycle.SavedStateHandle
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.example.modifier.Global
import com.example.modifier.data.BackupItem
import com.example.modifier.data.BackupItemDao
import kotlinx.coroutines.flow.MutableStateFlow
import kotlinx.coroutines.flow.asStateFlow
import kotlinx.coroutines.flow.map
import kotlinx.coroutines.flow.update
import kotlinx.coroutines.launch
import java.time.LocalDateTime
import java.util.Date

class BackupViewModel(
    savedStateHandle: SavedStateHandle,
    private val itemDao: BackupItemDao
) : ViewModel() {

    val _uiState = MutableStateFlow(BackupUiState())
    val uiState = _uiState.asStateFlow()

    fun addBackup() {
        viewModelScope.launch {

        }
    }

    fun loadBackups() {
        viewModelScope.launch {

        }
    }
}

data class BackupUiState(
    val itemList: MutableList<BackupItem> = mutableListOf(),
    val backingUp: Boolean = false
)