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

122 lines
4.6 KiB
TypeScript
Raw Normal View History

2026-08-13 07:00:46 +00:00
// Module ID: 12164
// Function ID: 12165
2026-07-20 16:05:17 +00:00
// Name: DiscoverabilityLandingScene
2026-08-13 07:00:46 +00:00
// Dependencies: [19, 17, 12094, 1922, 676, 21, 4342, 712, 5307, 1499, 589, 12101, 691, 12121, 12165, 12114, 503, 5823, 1236, 2]
2026-07-20 16:05:17 +00:00
2026-08-13 07:00:46 +00:00
// Module 12164 (DiscoverabilityLandingScene)
2026-07-29 08:29:29 +00:00
import set from "set";
import { View } from "NavigationStack";
import { useContactSyncModalStore } from "ContactSyncModes";
import mergeGuildAvatar from "mergeGuildAvatar";
2026-07-23 10:11:24 +00:00
import { jsx } from "jsxProd";
2026-07-29 08:29:29 +00:00
import createCacheKey from "createCacheKey";
2026-07-23 10:11:24 +00:00
const 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;
const items = [mergeGuildAvatar];
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;
const allowEmail = tmp4.allowEmail;
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-07-29 08:29:29 +00:00
const View = tmp5;
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-07-23 10:11:24 +00:00
if (closure_4) {
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() {
let allowPhone;
let name;
2026-07-29 08:29:29 +00:00
const tmp = createCacheKey();
2026-07-20 16:05:17 +00:00
({ name, allowPhone } = useContactSyncModalStore());
const items = [allowPhone];
const effect = React.useEffect(() => {
if (!allowPhone) {
2026-07-23 10:11:24 +00:00
const result = allowPhone(outer1_2[13]).closeDiscoverabilityModal(false);
const obj = allowPhone(outer1_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-07-20 16:05:17 +00:00
const callback = React.useCallback((arg0) => {
2026-08-13 07:00:46 +00:00
const result = allowPhone(12121).startContactSyncForDiscoverability(arg0);
const obj = allowPhone(12121);
const result1 = allowPhone(12121).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-13 07:00:46 +00:00
obj[1] = jsx(importDefault(12114), { 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-07-29 08:29:29 +00:00
obj = { screens: null, initialRouteName: null, headerBackTitle: null };
obj[0] = set.useMemo(() => {
2026-07-20 16:05:17 +00:00
let obj = {};
2026-07-29 08:29:29 +00:00
obj = { ignoreKeyboard: true, impressionName: null, fullscreen: true, headerLeft: null, headerTitle: null, render: null };
obj[1] = callback(503).ImpressionNames.DISCOVERABILITY;
obj[3] = function headerLeft() {
return null;
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[4] = function headerTitle() {
return null;
};
obj[5] = function render() {
return callback(closure_9, {});
};
obj[callback(691).DiscoverabilityScenes.LANDING] = obj;
obj = { ignoreKeyboard: true, impressionName: null, fullscreen: true, headerTitle: null, render: null };
obj[1] = callback(503).ImpressionNames.DISCOVERABILITY;
obj[3] = function headerTitle() {
return null;
};
obj[4] = function render() {
return callback(closure_10, {});
2026-07-20 16:05:17 +00:00
};
2026-07-29 08:29:29 +00:00
obj[callback(691).DiscoverabilityScenes.NAME] = obj;
2026-07-20 16:05:17 +00:00
return obj;
2026-07-29 08:29:29 +00:00
}, []);
obj[1] = require("keys").DiscoverabilityScenes.LANDING;
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 };
createCacheKey = { flex: 1, backgroundColor: require("Themes").colors.BACKGROUND_BASE_LOW, justifyContent: "center", paddingBottom: 44, paddingTop: require("NAV_BAR_HEIGHT").NAV_BAR_HEIGHT + 32 };
createCacheKey[0] = createCacheKey;
createCacheKey = createCacheKey.createStyles(createCacheKey);
2026-07-23 10:11:24 +00:00
DiscoverabilityModal.modalConfig = { animation: require("ME").ModalAnimation.SLIDE_IN_OUT };
2026-07-29 08:29:29 +00:00
let result = require("ContactSyncModes").fileFinishedImporting("modules/nuf/native/components/DiscoverabilityModal.tsx");
2026-07-20 16:05:17 +00:00
export default DiscoverabilityModal;