/* 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] */
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_3 = importDefault(5) /* metro dependency 5 */;
const env0_4 = importAll(31) /* metro dependency 31 */;
const surveyStore = importDefault(9536) /* metro dependency 9536: SurveyStore */;
const env0_6 = (require(661) /* metro dependency 661: Constants */).AnalyticEvents;
const env0_7 = (require(33) /* metro dependency 33 */).jsx;
const env0_8 = (require(4501) /* metro dependency 4501: createStyles */).createStyles({confirmIcon: {marginLeft: 4}});
(require(2) /* metro dependency 2 */).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();
});
env0_4.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;
defaultImportProps.onCancel = onCancel;
defaultImportProps.renderConfirmRightIcon = renderConfirmRightIcon;
r0 = ;
} 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 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 = importDefault(3853) /* metro dependency 3853: 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 = (require(1305) /* metro dependency 1305: native */).Icon;
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
const Icon2 = (require(1305) /* metro dependency 1305: native */).Icon;
const Sizes = Icon2.Sizes;
const SMALL = Sizes.SMALL;
return (
);
}
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);
}
}