111 lines
6.9 KiB
TypeScript
111 lines
6.9 KiB
TypeScript
/* Metro module 15275; source: components_native/MobileSurvey.tsx; dependencies: [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418, 2] */
|
|
import Module00005 from '../by-id/module-00005.js'; /* Metro dependency 5 */
|
|
import Native from '../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import Linking from '../lib/native/Linking.tsx'; /* Metro dependency 3853 */
|
|
import Module09418 from '../by-id/module-09418.js'; /* Metro dependency 9418 */
|
|
import SurveyStore from '../stores/SurveyStore.tsx'; /* Metro dependency 9536 */
|
|
import * as FileImportTrackerModule from '../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactModule from '../by-id/module-00031-React.js'; /* Metro dependency 31 */
|
|
import * as JsxRuntimeModule from '../by-id/module-00033-JsxRuntime.js'; /* Metro dependency 33 */
|
|
import * as ConstantsModule from '../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as NativeModule from '../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as CreateStylesModule from '../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
|
|
function _fun116787(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#116787, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:6, offset: 0x0249691a, size: 236 bytes, params: 8, frame: 20
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_8 = (CreateStylesModule).createStyles({confirmIcon: {marginLeft: 4}});
|
|
(FileImportTrackerModule).fileFinishedImporting('components_native/MobileSurvey.tsx');
|
|
exports.default = MobileSurvey;
|
|
function MobileSurvey() { // fn#116788, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:224, offset: 0x02496a06, size: 262 bytes, params: 1, frame: 20
|
|
var r0;
|
|
var Alert;
|
|
var intl;
|
|
const env0_0 = useStyles();
|
|
const currentSurvey = (require(566) /* metro dependency 566: flux */).useStateFromStores([SurveyStore], function() {
|
|
return SurveyStore.getCurrentSurvey();
|
|
});
|
|
ReactModule.useEffect(_fun116790, [currentSurvey]);
|
|
const value2 = null;
|
|
if (value2 != currentSurvey) {
|
|
Alert = importDefault(4596) /* metro dependency 4596: Alert */;
|
|
var defaultImportProps = {body: currentSurvey.prompt, confirmText: currentSurvey.cta};
|
|
intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
defaultImportProps.cancelText = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.f3Pet9);
|
|
defaultImportProps.onConfirm = onConfirm_116795;
|
|
defaultImportProps.onCancel = onCancel_116796;
|
|
defaultImportProps.renderConfirmRightIcon = renderConfirmRightIcon_116797;
|
|
r0 = <Alert {...defaultImportProps} />;
|
|
} else {
|
|
r0 = value2;
|
|
}
|
|
return r0;
|
|
function _fun116790() { // fn#116790, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:339, offset: 0x02496b1f, size: 104 bytes, params: 1, frame: 16
|
|
var environment;
|
|
var value2;
|
|
var defaultImport;
|
|
if (currentSurvey != null) {
|
|
value2 = environment.__proto__;
|
|
defaultImport = importDefault(683) /* metro dependency 683: AnalyticsUtils */;
|
|
defaultImport.track(AnalyticEvents.OPEN_MODAL, {type: 'survey', promotion_id: currentSurvey.id});
|
|
_fun116791()();
|
|
}
|
|
function _fun116791() { // fn#116791, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:424, offset: 0x02496b87, size: 36 bytes, params: 1, frame: 12
|
|
const env0_0 = env2_3(_fun116793);
|
|
return _fun116794;
|
|
function* _fun116793() { // fn#116793, original name: ?anon_0_, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:444, offset: 0x02496bb6, size: 74 bytes, params: 1, frame: 13
|
|
if (true) {
|
|
value = environment.__proto__.__proto__.__proto__.__proto__;
|
|
value = env4_0(env4_2[8]);
|
|
yield value.surveySeen(importDefault.key);
|
|
}
|
|
}
|
|
|
|
function _fun116794() { // fn#116794, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:498, offset: 0x00c3945f, size: 30 bytes, params: 1, frame: 13
|
|
return env0_0.apply(this, arguments);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
function MobileSurveyOnConfirm() { // fn#116795, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:668, owner: MobileSurvey.onConfirm, offset: 0x02496c00, size: 85 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
const defaultImport = Linking;
|
|
const openURL = defaultImport.openURL;
|
|
const currentSurveyBinding = currentSurvey;
|
|
Reflect.apply(openURL, defaultImport, [currentSurveyBinding.url]);
|
|
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
|
|
value.surveyHide(currentSurveyBinding.key, false);
|
|
}
|
|
|
|
function MobileSurveyOnCancel() { // fn#116796, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:736, owner: MobileSurvey.onCancel, offset: 0x02496c55, size: 53 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__;
|
|
value = require(9537) /* metro dependency 9537: SurveyActionCreators */;
|
|
return value.surveyHide(currentSurvey.key, true);
|
|
}
|
|
|
|
function MobileSurveyRenderConfirmRightIcon() { // fn#116797, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:15472:792, owner: MobileSurvey.renderConfirmRightIcon, offset: 0x02496c8a, size: 138 bytes, params: 1, frame: 18
|
|
const Icon = (NativeModule).Icon;
|
|
const WHITE = (Native).unsafe_rawColors.WHITE;
|
|
const Icon2 = (NativeModule).Icon;
|
|
const Sizes = Icon2.Sizes;
|
|
const SMALL = Sizes.SMALL;
|
|
return (
|
|
<Icon
|
|
style={styles.confirmIcon}
|
|
color={WHITE}
|
|
size={SMALL}
|
|
source={Module09418}
|
|
/>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun116787, 15275, [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418,
|
|
2]) /* metro module 15275, dependencies: [5, 31, 9536, 661, 33, 4501, 566, 683, 9537, 4596, 1244, 3853, 1305, 697, 9418, 2] */;
|