package com.syncflow.data.providers.nextcloud

import com.syncflow.data.providers.webdav.WebDavProvider
import com.syncflow.domain.model.CloudAccount

class NextcloudProvider(account: CloudAccount) : WebDavProvider(account) {
    // Nextcloud WebDAV endpoint is /remote.php/dav/files/<username>/
    override val baseUrl: String
        get() {
            val server = account.serverUrl?.trimEnd('/') ?: ""
            val email = account.email ?: "user"
            return "$server/remote.php/dav/files/$email"
        }
}
