decord/source/modules/phone/PhoneStore.tsx

52 lines
1.8 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 8628
// Function ID: 8629
2026-07-29 08:29:29 +00:00
// Name: handleSetLocationMetadata
2026-08-25 06:04:03 +00:00
// Dependencies: [4078, 589, 709, 2]
2026-07-23 10:11:24 +00:00
2026-08-25 06:04:03 +00:00
// Module 8628 (handleSetLocationMetadata)
2026-08-24 06:08:38 +00:00
import set from "set" /* 2 */;
import initializeDefault from "initialize" /* 589 */;
import dispatcherDefault from "dispatcher" /* 709 */;
2026-08-25 06:04:03 +00:00
import DEFAULT_COUNTRY_CODE_NAME from "DEFAULT_COUNTRY_CODE_NAME" /* 4078 */;
2026-07-20 16:05:17 +00:00
function handleSetLocationMetadata(countryCode) {
countryCode = countryCode.countryCode;
if (null != countryCode) {
let tmp2 = getCountryCodeByAlpha2(countryCode);
2026-07-29 08:29:29 +00:00
if (tmp2 == null) {
2026-07-20 16:05:17 +00:00
tmp2 = getDefaultCountryCode();
}
2026-08-24 06:08:38 +00:00
closure_3 = tmp2;
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
const getDefaultCountryCode = DEFAULT_COUNTRY_CODE_NAME.getDefaultCountryCode;
const getCountryCodeByAlpha2 = DEFAULT_COUNTRY_CODE_NAME.getCountryCodeByAlpha2;
let closure_3 = getDefaultCountryCode();
2026-08-24 06:08:38 +00:00
const DeviceSettingsStore = initializeDefault.DeviceSettingsStore;
2026-07-29 08:29:29 +00:00
class PhoneStore extends DeviceSettingsStore {
}
const prototype = PhoneStore.prototype;
prototype["initialize"] = function initialize(selectedCountryCode) {
if (null != selectedCountryCode) {
selectedCountryCode = selectedCountryCode.selectedCountryCode;
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
};
prototype["getUserAgnosticState"] = function getUserAgnosticState() {
return { selectedCountryCode: closure_0 };
};
prototype["getCountryCode"] = function getCountryCode() {
return null != closure_0 ? closure_0 : closure_3;
};
PhoneStore.displayName = "PhoneStore";
PhoneStore.persistKey = "PhoneStore";
2026-08-24 06:08:38 +00:00
const phoneStore = new PhoneStore(dispatcherDefault, {
2026-07-20 16:05:17 +00:00
PHONE_SET_COUNTRY_CODE: function handleSetCountryCode(countryCode) {
countryCode = countryCode.countryCode;
},
CONNECTION_OPEN: handleSetLocationMetadata,
SET_LOCATION_METADATA: handleSetLocationMetadata
});
2026-08-24 06:08:38 +00:00
const result = set.fileFinishedImporting("modules/phone/PhoneStore.tsx");
2026-07-20 16:05:17 +00:00
2026-07-29 08:29:29 +00:00
export default phoneStore;