/* Metro module 14321; source: modules/auth/native/components/RegisterPhoneOrEmailInput.tsx; dependencies: [31, 8972, 14304, 33, 1484, 14322, 566, 8993, 676, 1244, 8992, 2] */ import PhoneStore from '../../../phone/PhoneStore.tsx'; /* Metro dependency 8972 */ import PhoneOrEmailInput from '../../../phone/native/PhoneOrEmailInput.tsx'; /* Metro dependency 8992 */ 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 ConstantsIOSModule from '../../../../ConstantsIOS.tsx'; /* Metro dependency 676 */ import * as UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */ import * as PhoneOrEmailUtilsModule from '../../../phone/PhoneOrEmailUtils.tsx'; /* Metro dependency 8993 */ import * as RegistrationUIStoreModule from '../RegistrationUIStore.tsx'; /* Metro dependency 14304 */ function _fun108395(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108395, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:6, offset: 0x0231f086, size: 190 bytes, params: 8, frame: 19 const env0_0 = require; const Object = global.Object; Object.defineProperty(exports, '__esModule', {value: true}); (FileImportTrackerModule).fileFinishedImporting('modules/auth/native/components/RegisterPhoneOrEmailInput.tsx'); exports.RegisterPhoneOrEmailInput = RegisterPhoneOrEmailInput; function RegisterPhoneOrEmailInput({loginPhone, loginEmail, setLoginPhone, setLoginEmail, inputMode, onSubmit, inputError, submitBehavior, autoFocus}) { // fn#108396, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:316, offset: 0x0231f144, size: 935 bytes, params: 2, frame: 32 const intl = (require(1244) /* metro dependency 1244: indexNative */).intl; const setLoginEmail2 = setLoginEmail; const value3 = (UseNavigationNativeModule).useNavigation(); let binding = setLoginEmail2; const value4 = binding.useRef(null); (importDefault(14322) /* metro dependency 14322: useFocusRefOnNavigation */)({inputRef: value4, enabled: autoFocus != null && autoFocus}); const countryCode = (require(566) /* metro dependency 566: flux */).useStateFromStores([PhoneStore], function() { return PhoneStore.getCountryCode(); }); const code = countryCode.code; const value6 = useRegistrationUIStore(function(a0) { return a0.errors; }); binding = setLoginEmail2; const value8 = binding.useCallback(_fun108400, [inputMode, binding.useCallback(_fun108399, [value6]), setLoginPhone, setLoginEmail]); const value9 = binding.useCallback(_fun108401, [value3]); const env0_9 = binding.useRef(inputMode); binding.useLayoutEffect(_fun108402, [inputMode, loginEmail, loginPhone]); const PhoneOrEmailSelectorForceMode = (PhoneOrEmailUtilsModule).PhoneOrEmailSelectorForceMode; let PHONE = PhoneOrEmailSelectorForceMode.PHONE; const r12 = inputMode === PHONE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t['eJnn0+']) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.dI4d4S); PHONE = PhoneOrEmailSelectorForceMode.PHONE; const r13 = inputMode === PHONE ? intl.string((require(1244) /* metro dependency 1244: indexNative */).t.wpJ1dT) : intl.string((require(1244) /* metro dependency 1244: indexNative */).t.a17rBk); const alpha2 = countryCode.alpha2; PHONE = PhoneOrEmailSelectorForceMode.PHONE; const r7 = inputMode !== PHONE ? 'email' : 'tel'; PHONE = PhoneOrEmailSelectorForceMode.PHONE; return ( ); function _fun108399(a0) { // fn#108399, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:673, offset: 0x0231f4fe, size: 55 bytes, params: 2, frame: 13 var object; const property = JsxRuntimeModule.jsx[a0]; if (property != null) { object = {}; copyDataProperties(object, JsxRuntimeModule.jsx, property); delete object[a0]; value = environment.__proto__; setRegistrationErrors(object); } } function _fun108400(a0, a1) { // fn#108400, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:747, offset: 0x0231f535, size: 103 bytes, params: 3, frame: 15 const inputModeBinding = inputMode; const PhoneOrEmailSelectorForceMode = (PhoneOrEmailUtilsModule).PhoneOrEmailSelectorForceMode; const PHONE = PhoneOrEmailSelectorForceMode.PHONE; if (inputModeBinding === PHONE) { env0_8('phone'); setLoginPhone(a0, a1); } else { env0_8('email'); setLoginEmail(a0); } } function _fun108401() { // fn#108401, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:871, offset: 0x0231f59c, size: 56 bytes, params: 1, frame: 13 const push = RegistrationUIStoreModule.setRegistrationErrors.push; const AuthStates = (ConstantsIOSModule).AuthStates; const COUNTRY_SELECT = AuthStates.COUNTRY_SELECT; Reflect.apply(push, RegistrationUIStoreModule.setRegistrationErrors, [COUNTRY_SELECT]); } function _fun108402() { // fn#108402, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14518:958, offset: 0x0231f5d4, size: 141 bytes, params: 1, frame: 13 var binding; var value2; let current = env0_9.current; let inputModeBinding = inputMode; if (current !== inputModeBinding) { binding = env0_9; inputModeBinding = inputMode; binding.current = inputModeBinding; value2 = environment.__proto__; if (inputModeBinding === (require(8993) /* metro dependency 8993: PhoneOrEmailUtils */).PhoneOrEmailSelectorForceMode.PHONE) { current = RegistrationUIStoreModule.useRegistrationUIStore.current; if (current != null) { current.setText(loginPhone); } } else { current = RegistrationUIStoreModule.useRegistrationUIStore.current; if (current != null) { current.setText(loginEmail); } } } } } } global.__d(_fun108395, 14321, [31, 8972, 14304, 33, 1484, 14322, 566, 8993, 676, 1244, 8992, 2]) /* metro module 14321, dependencies: [31, 8972, 14304, 33, 1484, 14322, 566, 8993, 676, 1244, 8992, 2] */;