package com.example.livingai.data.repository.business

import androidx.paging.PagingData
import com.example.livingai.domain.model.AnimalProfile
import com.example.livingai.domain.repository.business.AnimalProfileRepository
import com.example.livingai.domain.repository.business.DataSource
import kotlinx.coroutines.flow.Flow

class AnimalProfileRepositoryImpl(
    private val dataSource: DataSource
) : AnimalProfileRepository {
    override fun getAnimalProfiles(): Flow<PagingData<AnimalProfile>> {
        return dataSource.getAnimalProfiles()
    }

    override suspend fun saveAnimalProfile(animalProfile: AnimalProfile) {
        dataSource.setAnimalProfile(animalProfile)
    }

    override suspend fun deleteAnimalProfile(id: String) {
        dataSource.deleteAnimalProfile(id)
    }
}
