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 IsLoggedInUseCase @Inject constructor(
    private val repository: LoginRepository,
    dispatcherProvider: DispatcherProvider
) : FlowUseCase<Unit, Boolean>(dispatcherProvider) {

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