package com.example.doctor.Pref

import android.content.Context
import android.content.SharedPreferences

class ConclusionPref() {

    fun conclusionToken(context: Context):String {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORtoken", Context.MODE_PRIVATE)
        val token = prefDoctor.getString("token", "")
        return token.toString()
    }

    fun conclusionViewPatient(context: Context):Int {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORviewPatient", Context.MODE_PRIVATE)
        val viewPatient = prefDoctor.getInt("viewPatient", 0)
        return viewPatient.toInt()
    }

    fun conclusionIdPatient(context: Context):Int {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORidPatient", Context.MODE_PRIVATE)
        val idPatient = prefDoctor.getInt("idPatient", 0)
        return idPatient.toInt()
    }

    fun conclusionIdCourses(context: Context):Int {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORidCourses", Context.MODE_PRIVATE)
        val idPatient = prefDoctor.getInt("idCourses", 0)
        return idPatient.toInt()
    }

    fun conclusionIdActivitis(context: Context):Int {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORIdActivitis", Context.MODE_PRIVATE)
        val idPatient = prefDoctor.getInt("idActivitis", 0)
        return idPatient.toInt()
    }
}