package `in`.techware.carrefour.config

import `in`.techware.carrefour.util.FileOp
import android.util.Log
import fr.arnaudguyon.xmltojsonlib.XmlToJson


private val TAG = "AppSettings"

/**
 * Created by Jemsheer K D on 25 July, 2018.
 * Package in.techware.carrefour.config
 * Project Carrefour
 */
/*
class AppSettingsBak private constructor() {


    var dataConnMode: String = ""
    var audioFilePath: String = ""
    var dataFolderPath: String = ""

    var ELIEUserFileName: String = ""
    var orderFileName: String = ""
    var usersFileName: String = ""

    var ITFunctions: String = ""
    var ELIEFunctions: String = ""
    var orderFunctions: String = ""
    var merchandFunctions: String = ""
    var PDTFunction: String = ""

    var FTPReceivePassword: String = ""
    var FTPReceiveServer: String = ""
    var FTPReceiveUserName: String = ""
    var FTPSendPassword: String = ""
    var FTPSendServer: String = ""
    var FTPSendUserName: String = ""

    var competitionFilePrefix: String = ""
    var expiredActionFilePrefix: String = ""
    var facingFilePrefix: String = ""
    var facingMinStockFilePrefix: String = ""
    var foodBankPrefix: String = ""
    var inventoryLabelFilePrefix: String = ""
    var itemExpiryFilePrefix: String = ""
    var itemListFilePrefix: String = ""
    var ITLabelFilePrefix: String = ""
    var labelSurveyFilePrefix: String = ""
    var minimumStockFilePrefix: String = ""
    var outOfStockFilePrefix: String = ""
    var pricingFilePrefix: String = ""
    var productInfoLabelFilePrefix: String = ""
    var productInfoStockFilePrefix: String = ""
    var promotionFilePrefix: String = ""
    var receiveFunctions: String = ""
    var receivingFilePrefix: String = ""
    var returnFilePrefix: String = ""
    var shelfLabelFilePrefix: String = ""
    var stockTakeFilePrefix: String = ""
    var transferCorrectionFilePrefix: String = ""
    var transferFilePrefix: String = ""
    var transformationQTYPrefix: String = ""
    var transOffsiteToStoreFilePrefix: String = ""
    var transStorToOffsiteFilePrefix: String = ""
    var wasteFilePrefix: String = ""

    var scanFlag: String = ""
    var serviceURL: String = ""
    var storeID: String = ""

    companion object {

        private var instance: AppSettingsBak? = null



        fun getInstance(): AppSettingsBak {

            var fop = FileOp()

            var str: String = fop.readExternalFile(FileOp.RECEIVED_FILES + FileOp.SEPARATOR + "AppSettings.xml");

            Log.i(TAG, "APP SETTINGS : " + str);
            val xmlToJson = XmlToJson.Builder(str).build()
            val appSettingsObj = xmlToJson.toJson()
            Log.i(TAG, "APP SETTINGS IN JSON : " + appSettingsObj.toString());

            if (instance == null) {
                instance = AppSettingsBak()

                var fop = FileOp()

                var str: String = fop.readExternalFile(FileOp.RECEIVED_FILES + FileOp.SEPARATOR + "AppSettings.xml");

                Log.i(TAG, "APP SETTINGS : " + str);
                val xmlToJson = XmlToJson.Builder(str).build()
                val appSettingsObj = xmlToJson.toJson()
                Log.i(TAG, "APP SETTINGS IN JSON : " + appSettingsObj.toString());
            }

            return instance as AppSettingsBak
        }

        fun clear() {
            instance = null
            instance = AppSettingsBak()
        }
    }

}
*/
