/*
 * SPDX-License-Identifier: GPL-3.0-or-later
 */
package com.runicgateway.app.data.repository

import com.runicgateway.app.core.result.ApiResult
import com.runicgateway.app.core.result.safeApiCall
import com.runicgateway.app.data.api.PublicApi
import com.runicgateway.app.data.api.dto.SettingsDto
import com.runicgateway.app.data.api.dto.StatusDto
import javax.inject.Inject
import javax.inject.Singleton

/** Site status (mode/maintenance) and settings/branding (PLAN.md §6.1). */
@Singleton
class SettingsRepository @Inject constructor(
    private val api: PublicApi,
) {
    suspend fun getStatus(): ApiResult<StatusDto> = safeApiCall { api.getStatus() }

    suspend fun getSettings(): ApiResult<SettingsDto> = safeApiCall { api.getSettings() }
}
