// Module ID: 17172 // Function ID: 17173 // Name: MobileSurvey // Dependencies: [5, 19, 4831, 1074, 21, 4640, 504, 1241, 4832, 5081, 1115, 4334, 1177, 576, 9598, 2] // Exports: default // Module 17172 (MobileSurvey) import nativeDefault from "native" /* 576 */; import native from "native" /* 1177 */; import LinkingDefault from "Linking" /* 4334 */; import SurveyActionCreators from "SurveyActionCreators" /* 4832 */; import _modDef9598 from "module_9598" /* 9598 */; import asyncGeneratorStep from "asyncGeneratorStep" /* 5 */; import noop from "module_19" /* 19 */; import SurveyStore from "SurveyStore" /* 4831 */; const require = globalThis.__r; require = fn; const AnalyticEvents = fn(1074).AnalyticEvents; const jsx = fn(21).jsx; const createStyles = fn(4640); let closure_8 = createStyles.createStyles({ confirmIcon: { marginLeft: 4 } }); const size = fn(2); const result = size.fileFinishedImporting("components_native/MobileSurvey.tsx"); export default function MobileSurvey() { _require = closure_8(); const items = [SurveyStore]; const stateFromStores = require("initialize").useStateFromStores(items, () => currentSurvey.getCurrentSurvey()); const items1 = [stateFromStores]; const effect = noop.useEffect(() => { if (null != stateFromStores) { closure_0 = async function _setSurveySeen(arg0, value) { if (c0 === 2) { c0 = 3; throw new TypeError("Generator functions may not be called on executing generators"); } else if (tmp3 === 3) { if (arg0 === 1) { throw value; } else if (arg0 === 2) { const obj3 = { value, done: true }; return obj3; } else { return { value: "HermesInternal", done: null }; } } else { try { c0 = 2; if (0 === c1) { if (arg0 === 1) { c0 = 3; throw value; } else if (arg0 === 2) { c0 = 3; const obj4 = { value, done: true }; return obj4; } else if (null != c1) { c1 = 1; c0 = 1; const obj5 = { value: confirmIcon(dependencyMap[8]).surveySeen(tmp5.key), done: false }; return obj5; } } else if (arg0 === 1) { c0 = 3; throw value; } else if (arg0 === 2) { c0 = 3; const obj = { value, done: true }; return obj; } c0 = 3; return { value: "HermesInternal", done: null }; } catch (tmp9) { c0 = tmp; throw tmp9; } } }; const obj2 = { type: "survey", promotion_id: tmp.id }; stateFromStores(dependencyMap[7]).track(constants.OPEN_MODAL, obj2); (function setSurveySeen() { const self = this; const apply = closure_0.apply; if (typeof apply === "unknown") { let applyArgumentsResult = HermesBuiltin.applyArguments(self); } else { applyArgumentsResult = apply(self, arguments); } return applyArgumentsResult; })(); let obj = stateFromStores(dependencyMap[7]); } }, items1); let tmp5 = null; if (null != stateFromStores) { let obj3 = { body: null, confirmText: null, cancelText: null, onConfirm: null, onCancel: null, renderConfirmRightIcon: null }; ({ prompt: obj2.body, cta: obj2.confirmText } = stateFromStores); const intl = tmp(1115).intl; obj3.cancelText = intl.string(tmp(1115).t.f3Pet9); obj3.onConfirm = function onConfirm() { LinkingDefault.openURL(stateFromStores.url); SurveyActionCreators.surveyHide(stateFromStores.key, false); }; obj3.onCancel = function onCancel() { return SurveyActionCreators.surveyHide(stateFromStores.key, true); }; obj3.renderConfirmRightIcon = function renderConfirmRightIcon() { return jsx(native.Icon, { style: confirmIcon.confirmIcon, color: nativeDefault.unsafe_rawColors.WHITE, size: native.Icon.Sizes.SMALL, source: _modDef9598 }); }; tmp5 = jsx(stateFromStores(5081), { body: null, confirmText: null, cancelText: null, onConfirm: null, onCancel: null, renderConfirmRightIcon: null }); const tmp8 = stateFromStores(5081); } return tmp5; };