package com.jiooption.trading

import android.app.Application
import com.jiooption.trading.firebase.NotificationHelper
import com.jiooption.trading.security.SecureStorage

/**
 * BinaryPro Application class
 * Initializes app-level dependencies
 */
class App : Application() {

    lateinit var secureStorage: SecureStorage
        private set

    override fun onCreate() {
        super.onCreate()
        instance = this

        // Initialize secure storage
        secureStorage = SecureStorage(this)

        // Initialize notification channels
        NotificationHelper.createNotificationChannels(this)
    }

    companion object {
        lateinit var instance: App
            private set

        fun getSecureStorage(): SecureStorage = instance.secureStorage
    }
}
