package com.radiola.domain.usecase.auth

import com.radiola.domain.repository.SyncRepository
import javax.inject.Inject

class PushFavoriteUseCase @Inject constructor(
    private val syncRepository: SyncRepository
) {
    suspend operator fun invoke(stationId: Int, isAdding: Boolean): Result<Unit> =
        if (isAdding) syncRepository.pushFavorite(stationId)
        else syncRepository.removeFavorite(stationId)
}
