decord/source/modules/nuf/native/components/DiscoverabilityModal.tsx

133 lines
4.9 KiB
TypeScript
Raw Normal View History

2026-08-25 06:04:03 +00:00
// Module ID: 12303
// Function ID: 12304
2026-07-20 16:05:17 +00:00
// Name: DiscoverabilityLandingScene
2026-08-25 06:04:03 +00:00
// Dependencies: [19, 17, 12233, 1922, 676, 21, 4380, 712, 5373, 1500, 589, 12240, 691, 12260, 12304, 12253, 503, 5889, 1236, 2]
2026-07-20 16:05:17 +00:00
2026-08-25 06:04:03 +00:00
// Module 12303 (DiscoverabilityLandingScene)
2026-08-24 06:08:38 +00:00
import keys from "keys" /* 691 */;
import ThemesDefault from "Themes" /* 712 */;
import getSystemLocale from "getSystemLocale" /* 1236 */;
2026-08-25 06:04:03 +00:00
import NavigationStack from "NavigationStack" /* 5889 */;
import ContactSyncNameInputDefault from "ContactSyncNameInput" /* 12253 */;
2026-08-24 06:08:38 +00:00
import closure_3 from "noop" /* 19 */;
import { View } from "get ActivityIndicator" /* 17 */;
2026-08-25 06:04:03 +00:00
import { useContactSyncModalStore } from "ContactSyncModes" /* 12233 */;
2026-08-24 06:08:38 +00:00
import closure_6 from "mergeGuildAvatar" /* 1922 */;
import { jsx } from "jsxProd" /* 21 */;
2026-08-25 06:04:03 +00:00
import createCacheKey from "createCacheKey" /* 4380 */;
2026-07-23 10:11:24 +00:00
2026-08-24 06:08:38 +00:00
require = arg1;
2026-07-20 16:05:17 +00:00
function DiscoverabilityLandingScene() {
2026-07-23 10:11:24 +00:00
navigation = navigation(allowPhone[9]).useNavigation();
let obj = navigation(allowPhone[9]);
2026-07-29 08:29:29 +00:00
const tmp = allowPhone;
2026-08-24 06:08:38 +00:00
const items = [closure_6];
2026-07-23 10:11:24 +00:00
const stateFromStores = navigation(allowPhone[10]).useStateFromStores(items, () => {
2026-07-29 08:29:29 +00:00
currentUser = currentUser.getCurrentUser();
2026-07-20 16:05:17 +00:00
let phone;
2026-07-29 08:29:29 +00:00
if (currentUser != null) {
2026-07-20 16:05:17 +00:00
phone = currentUser.phone;
}
return phone;
});
2026-07-29 08:29:29 +00:00
const tmp4 = useContactSyncModalStore();
allowPhone = tmp4.allowPhone;
2026-08-24 06:08:38 +00:00
let allowEmail = tmp4.allowEmail;
2026-07-29 08:29:29 +00:00
let tmp5 = allowPhone;
2026-07-20 16:05:17 +00:00
if (!allowPhone) {
2026-07-29 08:29:29 +00:00
tmp5 = allowEmail;
2026-07-20 16:05:17 +00:00
}
2026-08-24 06:08:38 +00:00
allowEmail = tmp5;
2026-07-29 08:29:29 +00:00
const items1 = [navigation, stateFromStores, allowEmail, allowPhone, tmp5];
2026-07-23 10:11:24 +00:00
const onNext = allowEmail.useCallback(() => {
2026-07-20 16:05:17 +00:00
let obj = stateFromStores(allowPhone[11]);
obj = { phone: allowPhone, email: allowEmail };
const result = obj.updateDiscoverability(obj);
2026-08-24 06:08:38 +00:00
if (allowEmail) {
2026-07-20 16:05:17 +00:00
if (null != stateFromStores) {
if (allowPhone) {
2026-07-29 08:29:29 +00:00
navigation.push(navigation(tmp[12]).DiscoverabilityScenes.NAME);
2026-07-20 16:05:17 +00:00
}
}
}
const result1 = navigation(allowPhone[13]).closeDiscoverabilityModal(false);
}, items1);
2026-07-29 08:29:29 +00:00
return jsx(stateFromStores(tmp[14]), { onNext });
2026-07-20 16:05:17 +00:00
}
function DiscoverabilityNameScene() {
2026-08-24 06:08:38 +00:00
const tmp = callback();
2026-07-20 16:05:17 +00:00
({ name, allowPhone } = useContactSyncModalStore());
const items = [allowPhone];
const effect = React.useEffect(() => {
if (!allowPhone) {
2026-08-24 06:08:38 +00:00
const result = allowPhone(closure_1_2[13]).closeDiscoverabilityModal(false);
const obj = allowPhone(closure_1_2[13]);
2026-07-20 16:05:17 +00:00
}
}, items);
2026-07-29 08:29:29 +00:00
let obj = { style: tmp.container, children: null };
2026-08-24 06:08:38 +00:00
callback = React.useCallback((arg0) => {
2026-08-25 06:04:03 +00:00
const result = allowPhone(12260).startContactSyncForDiscoverability(arg0);
const obj = allowPhone(12260);
const result1 = allowPhone(12260).closeDiscoverabilityModal(false);
2026-07-20 16:05:17 +00:00
}, []);
2026-07-29 08:29:29 +00:00
obj = { onNext: callback, loading: false, initialName: null };
2026-07-20 16:05:17 +00:00
const tmp2 = useContactSyncModalStore();
const tmp6 = View;
2026-07-29 08:29:29 +00:00
if (name == null) {
name = "";
2026-07-20 16:05:17 +00:00
}
2026-07-29 08:29:29 +00:00
obj[2] = name;
2026-08-24 06:08:38 +00:00
obj[1] = jsx(ContactSyncNameInputDefault, { onNext: callback, loading: false, initialName: null });
2026-07-29 08:29:29 +00:00
return <tmp6 onNext={callback} loading={false} initialName={null} />;
2026-07-20 16:05:17 +00:00
}
class DiscoverabilityModal {
constructor() {
2026-08-24 06:08:38 +00:00
obj = {
screens: closure_3.useMemo(() => {
let obj = {};
obj = {
ignoreKeyboard: true,
impressionName: callback(503).ImpressionNames.DISCOVERABILITY,
fullscreen: true,
headerLeft() {
return null;
},
headerTitle() {
return null;
},
render() {
return callback(closure_9, {});
}
};
obj[callback(691).DiscoverabilityScenes.LANDING] = obj;
obj = {
ignoreKeyboard: true,
impressionName: callback(503).ImpressionNames.DISCOVERABILITY,
fullscreen: true,
headerTitle() {
return null;
},
render() {
return callback(closure_10, {});
}
};
obj[callback(691).DiscoverabilityScenes.NAME] = obj;
return obj;
}, []),
initialRouteName: require("keys").DiscoverabilityScenes.LANDING,
headerBackTitle: null
};
2026-07-23 10:11:24 +00:00
intl = require("getSystemLocale").intl;
2026-07-29 08:29:29 +00:00
obj[2] = intl.string(require("getSystemLocale").t["13/7kX"]);
2026-07-23 10:11:24 +00:00
return jsx(require("NavigationStack").Navigator, obj);
2026-07-20 16:05:17 +00:00
}
}
2026-07-29 08:29:29 +00:00
createCacheKey = { container: null };
2026-08-24 06:08:38 +00:00
createCacheKey = { flex: 1, backgroundColor: ThemesDefault.colors.BACKGROUND_BASE_LOW, justifyContent: "center", paddingBottom: 44, paddingTop: require("NAV_BAR_HEIGHT").NAV_BAR_HEIGHT + 32 };
2026-07-29 08:29:29 +00:00
createCacheKey[0] = createCacheKey;
2026-08-24 06:08:38 +00:00
let closure_8 = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
DiscoverabilityModal.modalConfig = { animation: require("ME").ModalAnimation.SLIDE_IN_OUT };
2026-08-24 06:08:38 +00:00
let result = require("set").fileFinishedImporting("modules/nuf/native/components/DiscoverabilityModal.tsx");
2026-07-20 16:05:17 +00:00
export default DiscoverabilityModal;