package ru.fincode.tsudesk.feature.schedule.domain.usecase

import kotlinx.coroutines.flow.Flow
import ru.fincode.tsudesk.core.common.model.DataResult
import ru.fincode.tsudesk.feature.schedule.domain.model.ScheduleEntity
import ru.fincode.tsudesk.feature.schedule.domain.model.ScheduleType
import ru.fincode.tsudesk.feature.schedule.domain.repository.ScheduleRepository
import javax.inject.Inject

class ObserveScheduleUseCase @Inject constructor(
    private val repository: ScheduleRepository
) {
    operator fun invoke(type: ScheduleType): Flow<DataResult<ScheduleEntity>> =
        repository.observeSchedule(type)
}