package llc.arma.ble.domain.usecase

import kotlinx.coroutines.flow.Flow
import llc.arma.ble.domain.Result
import llc.arma.ble.domain.common.BleException
import llc.arma.ble.domain.common.ProgressState
import llc.arma.ble.domain.model.Ble
import llc.arma.ble.domain.repository.BleRepository
import javax.inject.Inject

class GetTemperatureHistoryBySerial @Inject constructor(
    private val bleRepository: BleRepository
) {

    suspend operator fun invoke(serial: String): Flow<Result<ProgressState<List<Ble.Thermometer.HistoryPoint>>, BleException>> {

        return bleRepository.getTemperatureHistoryBySerial(serial)

    }

}