package com.cloud.hmg_patient_app.PermissionManager

import android.Manifest
import android.os.Build

object PermissionHelper {

    fun getRequiredPermissions(): Array<String> {
        val permissions = mutableListOf(
            Manifest.permission.INTERNET,
            Manifest.permission.ACCESS_FINE_LOCATION,
            Manifest.permission.ACCESS_COARSE_LOCATION,
            Manifest.permission.ACCESS_NETWORK_STATE,
            Manifest.permission.BLUETOOTH,
            Manifest.permission.BLUETOOTH_ADMIN,
//            Manifest.permission.ACTIVITY_RECOGNITION
        )

        // For Android 12 (API level 31) and above, add specific permissions
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) { // Android 12 (API 31) and above
            permissions.add(Manifest.permission.BLUETOOTH_SCAN)
            permissions.add(Manifest.permission.BLUETOOTH_CONNECT)
            permissions.add(Manifest.permission.HIGH_SAMPLING_RATE_SENSORS)
        }

        return permissions.toTypedArray()
    }
}