153 lines
8.9 KiB
TypeScript
153 lines
8.9 KiB
TypeScript
/* Metro module 15796; source: modules/nuf/native/components/RedesignDiscoverabilityModal.tsx; dependencies: [31, 27, 11994, 1878, 661, 33, 4501, 697, 5314, 1484, 566, 12001, 676, 15797, 12021, 12014, 480, 12013, 5280, 1244, 2] */
|
|
function _fun121362(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#121362, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:6, offset: 0x02545be2, size: 409 bytes, params: 8, frame: 24
|
|
var object2;
|
|
const env0_0 = require;
|
|
const closure = RedesignDiscoverabilityModal;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_3 = importAll(31) /* metro dependency 31 */;
|
|
const env0_4 = (require(27) /* metro dependency 27 */).View;
|
|
const env0_5 = (require(11994) /* metro dependency 11994: ContactSyncModalStore */).useContactSyncModalStore;
|
|
const userStore = importDefault(1878) /* metro dependency 1878: UserStore */;
|
|
const ModalAnimation = (require(661) /* metro dependency 661: Constants */).ModalAnimation;
|
|
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
|
|
const createStylesModule = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = createStylesModule.createStyles;
|
|
object2 = {};
|
|
let BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.header = {'borderBottomWidth': 0, 'backgroundColor': null, 'shadowColor': 'transparent',
|
|
backgroundColor: BACKGROUND_BASE_LOW};
|
|
const object4 = {'flex': 1, 'backgroundColor': null, 'justifyContent': 'center', 'paddingBottom': 44};
|
|
BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object4.backgroundColor = BACKGROUND_BASE_LOW;
|
|
const NAV_BAR_HEIGHT = (require(5314) /* metro dependency 5314: NavigatorConstantsNative */).NAV_BAR_HEIGHT;
|
|
object4.paddingTop = NAV_BAR_HEIGHT + 32;
|
|
object2.container = object4;
|
|
const env0_8 = Reflect.apply(createStyles, createStylesModule, [object2]);
|
|
const SLIDE_IN_OUT = ModalAnimation.SLIDE_IN_OUT;
|
|
closure.modalConfig = {animation: SLIDE_IN_OUT};
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/nuf/native/components/RedesignDiscoverabilityModal.tsx');
|
|
exports.default = closure;
|
|
}
|
|
|
|
function DiscoverabilityLandingScene_121363({onComplete}) { // fn#121363, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:485, offset: 0x02545d7b, size: 247 bytes, params: 2, frame: 22
|
|
const value2 = (require(1484) /* metro dependency 1484: useNavigationNative */).useNavigation();
|
|
const value3 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], _fun121364);
|
|
const value4 = useContactSyncModalStore();
|
|
const allowPhone = value4.allowPhone;
|
|
const env0_3 = allowPhone;
|
|
const name = value4.name;
|
|
const allowEmail = value4.allowEmail;
|
|
return ((Component) => <Component onNext={env0_3.useCallback(_fun121365, [allowPhone, allowEmail,
|
|
allowPhone || allowEmail, value3, name, value2,
|
|
onComplete])} />)(importDefault(15797) /* metro dependency 15797: RedesignDiscoverabilityLanding */);
|
|
}
|
|
|
|
function DiscoverabilityNameScene_121366({onComplete}) { // fn#121366, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:912, offset: 0x02545f07, size: 211 bytes, params: 2, frame: 19
|
|
const styles = useStyles();
|
|
const {name, allowPhone} = useContactSyncModalStore();
|
|
env0_3.useEffect(function() {
|
|
if (!allowPhone) {
|
|
onComplete();
|
|
}
|
|
}, [allowPhone, onComplete]);
|
|
return (
|
|
<View style={styles.container}>
|
|
{((Component) => <Component onNext={env0_3.useCallback(_fun121368,
|
|
[onComplete])} loading={false} initialName={name ?? ''} />)(importDefault(12014) /* metro dependency 12014: ContactSyncNameInput */)}
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function RedesignDiscoverabilityModal(a0) { // fn#121369, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1219, offset: 0x02546026, size: 206 bytes, params: 2, frame: 20
|
|
const onComplete = a0.route.params.onComplete;
|
|
const styles = useStyles();
|
|
const Navigator = (require(5280) /* metro dependency 5280: NavigatorNative */).Navigator;
|
|
const binding = env0_3;
|
|
const useMemo = binding.useMemo;
|
|
const items2 = [onComplete];
|
|
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
|
|
const LANDING = DiscoverabilityScenes.LANDING;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
return (
|
|
<Navigator
|
|
headerStyle={styles.header}
|
|
screens={Reflect.apply(useMemo, binding, [function() {
|
|
return _fun121371(onComplete ?? _fun121379);
|
|
}, items2])}
|
|
initialRouteName={LANDING}
|
|
headerBackTitle={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['13/7kX'])}
|
|
/>
|
|
);
|
|
}
|
|
|
|
function _fun121365() { // fn#121365, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:737, offset: 0x02545e72, size: 149 bytes, params: 1, frame: 15
|
|
var binding;
|
|
(importDefault(12001) /* metro dependency 12001: ContactSyncActionCreators */).updateDiscoverability({phone: allowPhone,
|
|
email: allowEmail});
|
|
if (env0_6) {
|
|
if (env0_2 == null) {
|
|
onComplete();
|
|
} else if (allowPhone) {
|
|
if (name == null) {
|
|
binding = env0_1;
|
|
binding.push((require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes.NAME);
|
|
} else {
|
|
onComplete();
|
|
}
|
|
} else {
|
|
onComplete();
|
|
}
|
|
} else {
|
|
onComplete();
|
|
}
|
|
}
|
|
|
|
function _fun121368(a0) { // fn#121368, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1057, offset: 0x02545ff2, size: 52 bytes, params: 2, frame: 12
|
|
const value = environment.__proto__;
|
|
(require(12021) /* metro dependency 12021: NUFActionCreators */).startContactSyncForDiscoverability(a0);
|
|
onComplete();
|
|
}
|
|
|
|
function _fun121370() { // fn#121370, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1369, offset: 0x025460f4, size: 44 bytes, params: 1, frame: 12
|
|
return getScreens_121371(onComplete ?? (function() {
|
|
}));
|
|
}
|
|
|
|
function getScreens_121371(a0) { // fn#121371, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1373, offset: 0x02546120, size: 238 bytes, params: 2, frame: 18
|
|
const env0_0 = a0;
|
|
const object2 = {};
|
|
const DiscoverabilityScenes = (require(676) /* metro dependency 676: ConstantsIOS */).DiscoverabilityScenes;
|
|
const LANDING = DiscoverabilityScenes.LANDING;
|
|
const ImpressionNames = (require(480) /* metro dependency 480: AnalyticsUtils */).ImpressionNames;
|
|
let DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
|
|
object2[LANDING] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
|
|
impressionName: DISCOVERABILITY, headerLeft: function() {
|
|
return null;
|
|
}, headerTitle: function() {
|
|
return null;
|
|
}, headerRight: headerRight_121374, render: render_121376};
|
|
const NAME = DiscoverabilityScenes.NAME;
|
|
DISCOVERABILITY = ImpressionNames.DISCOVERABILITY;
|
|
object2[NAME] = {'ignoreKeyboard': true, 'impressionName': null, 'fullscreen': true,
|
|
impressionName: DISCOVERABILITY, headerTitle: function() {
|
|
return null;
|
|
}, render: render_121378};
|
|
return object2;
|
|
}
|
|
|
|
function getScreens_121371HeaderRight(a0) { // fn#121374, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1586, owner: getScreens_121371.headerRight, offset: 0x0254620e, size: 74 bytes, params: 2, frame: 15
|
|
var environment;
|
|
const value = environment.__proto__.__proto__.__proto__;
|
|
return ((Component) => <Component insideNavigator {...a0} {...{['onPress']: headerRightOnPress_121375}} />)(importDefault(12013) /* metro dependency 12013: SkipHeaderButton */);
|
|
}
|
|
|
|
function getScreens_121371Render() { // fn#121376, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1652, owner: getScreens_121371.render, offset: 0x02546258, size: 35 bytes, params: 1, frame: 13
|
|
return <DiscoverabilityLandingScene_121363 onComplete={env0_0} />;
|
|
}
|
|
|
|
function getScreens_121371Render_121378() { // fn#121378, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:16004:1858, owner: getScreens_121371.render, offset: 0x0254627b, size: 35 bytes, params: 1, frame: 13
|
|
return <DiscoverabilityNameScene_121366 onComplete={env0_0} />;
|
|
}
|
|
|