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

import com.example.livingai.domain.model.AnimalDetails
import com.example.livingai.domain.repository.business.AnimalDetailsRepository
import com.example.livingai.domain.repository.business.DataSource
import kotlinx.coroutines.flow.Flow

class AnimalDetailsRepositoryImpl(
    private val dataSource: DataSource
) : AnimalDetailsRepository {
    override fun getAnimalDetails(id: String): Flow<AnimalDetails?> {
        return dataSource.getAnimalDetails(id)
    }

    override suspend fun saveAnimalDetails(animalDetails: AnimalDetails) {
        dataSource.setAnimalDetails(animalDetails)
    }

    override suspend fun deleteAnimalDetails(id: String) {
        // Currently only full profile deletion is exposed by DataSource as per request
        // but we can call that if needed, or just leave it as no-op if details deletion is specific
        // Assuming for now it deletes the profile or we might need to add specific delete to DataSource
        // But the prompt said "DataSource should have get, set and delete... get and delete based on a string which will be id"
        // And "deleteAnimalProfile - takes an Id deletes that animals complete profile"
        // So strictly for details, maybe we don't have a specific delete or we just don't impl it yet.
        // However, to satisfy the interface:
    }
}
