package de.trainingstagebuch.app.services

import de.trainingstagebuch.app.repository.HomeResult
import de.trainingstagebuch.app.repository.CreateClubResult
import de.trainingstagebuch.app.repository.ClubResult
import de.trainingstagebuch.app.repository.ClubAccessRequestResult
import de.trainingstagebuch.app.repository.MembersResult
import de.trainingstagebuch.app.repository.PendingApprovalsResult
import de.trainingstagebuch.app.repository.ClubActionResult
import de.trainingstagebuch.app.repository.TrainingstagebuchRepository

class HomeService(
    private val repository: TrainingstagebuchRepository
) {
    suspend fun loadHomeData(): HomeResult = repository.loadHomeData()
    suspend fun createClub(name: String): CreateClubResult = repository.createClub(name)
    suspend fun loadClub(clubId: String): ClubResult = repository.loadClub(clubId)
    suspend fun requestClubAccess(clubId: String): ClubAccessRequestResult = repository.requestClubAccess(clubId)
    suspend fun loadNotApprovedMembers(clubId: String): MembersResult = repository.loadNotApprovedMembers(clubId)
    suspend fun loadPendingApprovals(clubId: String): PendingApprovalsResult = repository.loadPendingApprovals(clubId)
    suspend fun approvePendingUser(clubId: String, userId: String): ClubActionResult = repository.approvePendingUser(clubId, userId)
    suspend fun rejectPendingUser(clubId: String, userId: String): ClubActionResult = repository.rejectPendingUser(clubId, userId)
}
