package club.clubk.ktag.apps.sharedservices

import android.content.Context
import android.content.Intent
import androidx.annotation.XmlRes
import club.clubk.ktag.apps.core.SubApp

/**
 * Extended SubApp interface for subapps that provide user-configurable settings.
 *
 * Subapps implementing this interface gain access to common settings infrastructure
 * including BaseSettingsActivity and shared preference utilities.
 */
interface SettingsSubApp : SubApp {
    /**
     * The XML resource ID for this subapp's preferences.
     */
    @get:XmlRes
    val settingsPreferencesResId: Int

    /**
     * Creates an Intent to launch the settings activity for this subapp.
     */
    fun createSettingsIntent(context: Context): Intent {
        return BaseSettingsActivity.createIntent(context, settingsPreferencesResId)
    }

    /**
     * Whether this subapp uses MQTT functionality.
     */
    val usesMqtt: Boolean
        get() = false
}
