2026-09-11 19:12:58 +00:00
|
|
|
// Module ID: 7491
|
|
|
|
|
// Function ID: 7492
|
2026-07-20 16:05:17 +00:00
|
|
|
// Name: useGeoForUser
|
2026-09-11 19:12:58 +00:00
|
|
|
// Dependencies: [19, 502, 4266, 7310, 504, 7488, 4930, 2]
|
2026-07-20 16:05:17 +00:00
|
|
|
// Exports: default
|
|
|
|
|
|
2026-09-11 19:12:58 +00:00
|
|
|
// Module 7491 (useGeoForUser)
|
|
|
|
|
import actions_BillingActionCreatorsAll from "actions/BillingActionCreators" /* 4930 */;
|
2026-09-10 05:38:07 +00:00
|
|
|
import noop from "module_19" /* 19 */;
|
|
|
|
|
import AuthenticationStore from "AuthenticationStore" /* 502 */;
|
2026-09-11 10:30:06 +00:00
|
|
|
import BillingInfoStore from "BillingInfoStore" /* 4266 */;
|
2026-09-11 19:12:58 +00:00
|
|
|
import IAPStore from "IAPStore" /* 7310 */;
|
2026-07-23 10:11:24 +00:00
|
|
|
|
2026-09-10 05:38:07 +00:00
|
|
|
const require = fn;
|
|
|
|
|
const size = fn(2);
|
|
|
|
|
const result = size.fileFinishedImporting("modules/premium/hooks/useGeoForUser.native.tsx");
|
2026-07-20 16:05:17 +00:00
|
|
|
|
|
|
|
|
export default function useGeoForUser() {
|
2026-09-10 05:38:07 +00:00
|
|
|
const items = [IAPStore];
|
|
|
|
|
const stateFromStores = stateFromStores2(504).useStateFromStores(items, () => {
|
|
|
|
|
product = product.getProduct(stateFromStores2(dependencyMap[5]).ProductIds.PREMIUM_TIER_2_MONTHLY);
|
2026-07-20 16:05:17 +00:00
|
|
|
let countryCode;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (product != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
countryCode = product.countryCode;
|
|
|
|
|
}
|
|
|
|
|
return countryCode;
|
|
|
|
|
});
|
2026-09-10 05:38:07 +00:00
|
|
|
let obj = stateFromStores2(504);
|
|
|
|
|
const items1 = [BillingInfoStore];
|
2026-09-05 10:56:28 +00:00
|
|
|
const stateFromStores1 = stateFromStores2(504).useStateFromStores(items1, () => ipLocation.ipLocation);
|
|
|
|
|
const obj2 = stateFromStores2(504);
|
2026-09-10 05:38:07 +00:00
|
|
|
const items2 = [AuthenticationStore];
|
2026-09-05 10:56:28 +00:00
|
|
|
stateFromStores2 = stateFromStores2(504).useStateFromStores(items2, () => authenticated.isAuthenticated());
|
2026-07-20 16:05:17 +00:00
|
|
|
const items3 = [stateFromStores1, stateFromStores2];
|
2026-09-10 05:38:07 +00:00
|
|
|
const effect = noop.useEffect(() => {
|
2026-07-20 16:05:17 +00:00
|
|
|
let tmp = stateFromStores2;
|
|
|
|
|
if (stateFromStores2) {
|
2026-09-10 05:38:07 +00:00
|
|
|
tmp = !BillingInfoStore.ipLocationLoaded;
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
if (tmp) {
|
2026-09-10 05:38:07 +00:00
|
|
|
ipLocation = actions_BillingActionCreatorsAll.fetchIpLocation();
|
2026-07-20 16:05:17 +00:00
|
|
|
}
|
|
|
|
|
}, items3);
|
2026-09-10 05:38:07 +00:00
|
|
|
const obj4 = { defaultBillingCountryCode: stateFromStores, ipCountryCode: null, ipSubdivisionCode: null };
|
2026-07-20 16:05:17 +00:00
|
|
|
let countryCode;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (stateFromStores1 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
countryCode = stateFromStores1.countryCode;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj4.ipCountryCode = countryCode;
|
2026-07-20 16:05:17 +00:00
|
|
|
let subdivisionCode;
|
2026-07-29 08:29:29 +00:00
|
|
|
if (stateFromStores1 != null) {
|
2026-07-20 16:05:17 +00:00
|
|
|
subdivisionCode = stateFromStores1.subdivisionCode;
|
|
|
|
|
}
|
2026-09-10 05:38:07 +00:00
|
|
|
obj4.ipSubdivisionCode = subdivisionCode;
|
|
|
|
|
return obj4;
|
2026-07-20 16:05:17 +00:00
|
|
|
};
|