package com.diegocayo.organizame.domain.usecase

import com.diegocayo.organizame.domain.repository.LoginRepository
import com.diegocayo.organizame.domain.utils.DispatcherProvider
import com.diegocayo.organizame.domain.utils.FlowUseCase
import kotlinx.coroutines.flow.flow
import javax.inject.Inject

class UpdateLoginStatusUseCase @Inject constructor(
    private val repository: LoginRepository,
    dispatcherProvider: DispatcherProvider
) : FlowUseCase<Boolean, Unit>(dispatcherProvider) {

    override fun prepareFlow(input: Boolean) = flow {
        repository.setLoginStatus(input)
        emit(Unit)
    }
} 