43 lines
1.4 KiB
TypeScript
43 lines
1.4 KiB
TypeScript
// Metro module 5674 (f5675).
|
|
import Module589 from "../../../_bundle/Module589";
|
|
import Module12 from "../../../_bundle/Module12";
|
|
import { GenericProductIds } from "../../premium/native/ProductIds.android";
|
|
import Dispatcher from "../../../Dispatcher";
|
|
const products = null;
|
|
const connected = false;
|
|
const storeFront = null;
|
|
class GenericIAPStore extends Module589.Store {
|
|
static displayName = "GenericIAPStore";
|
|
isGenericIapConnected() {
|
|
return connected;
|
|
}
|
|
genericProductsLoaded() {
|
|
return products != null && Module12.filter(products, (a0) => GenericProductIds.includes(a0.identifier)).length === GenericProductIds.length;
|
|
}
|
|
getProducts() {
|
|
return products;
|
|
}
|
|
getStoreFront() {
|
|
return storeFront;
|
|
}
|
|
}
|
|
const genericIAPStore = new GenericIAPStore(Dispatcher, {
|
|
IAP_LOAD_GENERIC_PRODUCTS: function initGenericProducts({ products: products2, storeFront: storeFront2 }) {
|
|
products = products2;
|
|
storeFront = storeFront2;
|
|
},
|
|
GENERIC_IAP_INIT_CONNECTION: function genericIapInitConnection(a0) {
|
|
connected = a0.connected;
|
|
},
|
|
GENERIC_IAP_INIT_CONNECTION_FAILED: function genericIapInitConnectionFailed() {
|
|
connected = false;
|
|
},
|
|
GENERIC_IAP_END_CONNECTION: function genericIapEndConnection() {
|
|
connected = false;
|
|
},
|
|
GENERIC_IAP_SET_STORE_FRONT: function setStoreFront(a0) {
|
|
storeFront = a0.storeFront;
|
|
}
|
|
});
|
|
export default genericIAPStore;
|