package com.example.doctor.Pref

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

class ClearPref() {

    fun clearToken(context: Context) {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORtoken", Context.MODE_PRIVATE)
        val edit = prefDoctor.edit()
        edit?.clear()
        edit?.apply()
    }

    fun clearViewPatient(context: Context) {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORviewPatient", Context.MODE_PRIVATE)
        val edit = prefDoctor.edit()
        edit?.clear()
        edit?.apply()
    }

    fun clearIdPatient(context: Context) {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORIdPatient", Context.MODE_PRIVATE)
        val edit = prefDoctor.edit()
        edit?.clear()
        edit?.apply()
    }

    fun clearIdCourses(context: Context) {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORIdCourses", Context.MODE_PRIVATE)
        val edit = prefDoctor.edit()
        edit?.clear()
        edit?.apply()
    }

    fun clearIdActivitis(context: Context) {
        val prefDoctor: SharedPreferences = context.getSharedPreferences("DOCTORIdActivitis", Context.MODE_PRIVATE)
        val edit = prefDoctor.edit()
        edit?.clear()
        edit?.apply()
    }
}