package de.trainingstagebuch.app.services

import de.trainingstagebuch.app.repository.MemberTransferActionResult
import de.trainingstagebuch.app.repository.MemberTransferConfigInput
import de.trainingstagebuch.app.repository.MemberTransferConfigResult
import de.trainingstagebuch.app.repository.MemberTransferExecutionResult
import de.trainingstagebuch.app.repository.TrainingstagebuchRepository

class MemberTransferService(
    private val repository: TrainingstagebuchRepository
) {
    suspend fun loadConfig(clubId: String): MemberTransferConfigResult {
        return repository.loadMemberTransferConfig(clubId)
    }

    suspend fun saveConfig(clubId: String, input: MemberTransferConfigInput): MemberTransferActionResult {
        return repository.saveMemberTransferConfig(clubId, input)
    }

    suspend fun deleteConfig(clubId: String): MemberTransferActionResult {
        return repository.deleteMemberTransferConfig(clubId)
    }

    suspend fun executeTransfer(clubId: String, input: MemberTransferConfigInput): MemberTransferExecutionResult {
        return repository.executeMemberTransfer(clubId, input)
    }
}
