package app.closer.domain.repository

import app.closer.domain.model.AuthState
import app.closer.domain.model.GoogleSignInResult
import kotlinx.coroutines.flow.Flow

interface AuthRepository {
    val authState: Flow<AuthState>
    val currentUserId: String?
    val currentUserEmail: String?
    val currentUserPhotoUrl: String?
    val currentUserDisplayName: String?
    val isSignedIn: Boolean
    val isAnonymous: Boolean
    val isGoogleAccount: Boolean
    val isEmailVerified: Boolean
    suspend fun signInWithGoogle(idToken: String): Result<GoogleSignInResult>
    suspend fun signInWithEmail(email: String, password: String): Result<String>
    suspend fun signUpWithEmail(email: String, password: String): Result<String>
    suspend fun sendEmailVerification(): Result<Unit>
    suspend fun reloadUser(): Result<Unit>
    suspend fun sendPasswordResetEmail(email: String): Result<Unit>
    suspend fun signOut()
    suspend fun reauthenticateWithEmail(email: String, password: String): Result<Unit>
    suspend fun deleteAccount(): Result<Unit>
}
