23 lines
730 B
TypeScript
23 lines
730 B
TypeScript
// Metro module 11905 (f11906).
|
|
import VirtualCurrencyStore from "../stores/VirtualCurrencyStore";
|
|
import { useStateFromStores } from "../../../_bundle/Module589";
|
|
export function useVirtualCurrencyBalance() {
|
|
return useStateFromStores([VirtualCurrencyStore], () => VirtualCurrencyStore.balance);
|
|
}
|
|
export function useHasEnoughVirtualCurrency(c19261_0) {
|
|
return useStateFromStores([VirtualCurrencyStore], () => {
|
|
let r1 = c19261_0 != null;
|
|
if (r1) {
|
|
let balance = VirtualCurrencyStore.balance;
|
|
if (balance == null) {
|
|
balance = 0;
|
|
}
|
|
r1 = balance >= c19261_0;
|
|
}
|
|
return r1;
|
|
});
|
|
}
|
|
export function getVirtualCurrencyBalance() {
|
|
return VirtualCurrencyStore.getCurrentBalance();
|
|
}
|