package id.iiyh.inatrading.feature.auth.domain.repository

import android.net.Uri
import id.iiyh.inatrading.feature.profile.data.model.BuyerProfile
import id.iiyh.inatrading.feature.profile.data.model.CityItem
import id.iiyh.inatrading.feature.profile.data.model.CreateShippingAddressRequest
import id.iiyh.inatrading.feature.profile.data.model.ProvinceItem
import id.iiyh.inatrading.feature.profile.data.model.ShippingAddress

interface AuthRepository {
    suspend fun login(email: String, password: String): Result<Unit>
    suspend fun register(name: String, email: String, mobile: String, password: String): Result<Unit>
    suspend fun getBuyerProfile(): Result<BuyerProfile>
    suspend fun getAddresses(): Result<List<ShippingAddress>>
    suspend fun getProvinces(): Result<List<ProvinceItem>>
    suspend fun getCities(provinceId: String): Result<List<CityItem>>
    suspend fun createAddress(request: CreateShippingAddressRequest): Result<Unit>
    suspend fun updateAddress(addressId: String, request: CreateShippingAddressRequest): Result<Unit>
    suspend fun deleteAddress(addressId: String): Result<Unit>
    suspend fun uploadFile(uri: Uri): Result<String>
    suspend fun updateBuyerProfile(
        name: String,
        mobile: String,
        imageId: String?,
        email: String,
        profileDescription: String? = null,
    ): Result<Unit>
    suspend fun changePassword(oldPassword: String, newPassword: String): Result<Unit>
    suspend fun logout()
}
