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EAAmB,GACzB,QAAhB,SAAS,GACT,iBAAiB,uBAAuB,EAAmB,GAE3D,QAAQ,IAAI,uCAEpB,CAGA,yBAAO,CAAmB,GACF,QAAhB,SAAS,GACT,iBAAiB,mBAAmB,GAEpC,QAAQ,IAAI,uCAEpB","file":"/npm/react-native-sibche-storekit@1.0.2/index.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/react-native-sibche-storekit@1.0.2/index.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","\n'use strict';\n\nimport { NativeModules, Platform, Linking } from 'react-native';\n\nconst RNSibcheStoreKit = NativeModules.SibcheStoreKit;\n\nexport default class SibcheStoreKit {\n\n    // Init sdk with your app's api key\n    static init(appId, appScheme) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.init(appId, appScheme);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Fetch list of your in-app-purchase packages\n    static fetchInAppPurchasePackages(callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.fetchInAppPurchasePackages(callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Fetch data of specific in-app-purchase package\n    static fetchInAppPurchasePackage(packageId, callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.fetchInAppPurchasePackage(packageId, callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Fetch list of active in-app-purchase packages\n    static fetchActiveInAppPurchasePackages(callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.fetchActiveInAppPurchasePackages((isSuccessful, error, purchasePackagesArray) => {\n                for (let i = 0; i < purchasePackagesArray.length; i++) {\n                    if (purchasePackagesArray[i] && purchasePackagesArray[i].package) {\n                        purchasePackagesArray[i].package = JSON.parse(purchasePackagesArray[i].package);\n                    }\n                }\n                callback(isSuccessful, error, purchasePackagesArray);\n            });\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // This command says SDK to show login view and return result\n    static loginUser(callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.loginUser(callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // This command used to logout user from sibche. Don't use unless you know what you are doing\n    static logoutUser(callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.logoutUser(callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Purchase specific packageId. After finishing, we call PurchaseCallback\n    static purchasePackage(packageId, callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.purchasePackage(packageId, (isSuccessful, error, purchasePackage) => {\n                if (purchasePackage && purchasePackage.package) {\n                    purchasePackage.package = JSON.parse(purchasePackage.package);\n                }\n                callback(isSuccessful, error, purchasePackage);\n            });\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Handle in-app-purchase returning from payment\n    static openUrl(url) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.openUrl(url);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Consumes purchased package item (if is consumable)\n    static consumePurchasePackage(purchasePackageId, callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.consumePurchasePackage(purchasePackageId, callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n\n    // Gets current user's data including of login status, user cellphone number and userId\n    static getCurrentUserData(callback) {\n        if (Platform.OS === 'ios') {\n            RNSibcheStoreKit.getCurrentUserData(callback);\n        } else {\n            console.log(\"This plugin support only iOS devices\");\n        }\n    }\n}\n"]}