156 lines
8.8 KiB
TypeScript
156 lines
8.8 KiB
TypeScript
/* Metro module 14335; source: modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx; dependencies: [31, 27, 1226, 661, 33, 4501, 697, 1484, 566, 5076, 8973, 1244, 9001, 14336, 4573, 6261, 4578, 2] */
|
|
import AuthenticationStore from '../../../../stores/AuthenticationStore.tsx'; /* Metro dependency 1226 */
|
|
import UseWideAuthView from '../useWideAuthView.tsx'; /* Metro dependency 8973 */
|
|
import AuthFormView from './AuthFormView.tsx'; /* Metro dependency 9001 */
|
|
import * as FileImportTrackerModule from '../../../../by-id/module-00002-FileImportTracker.js'; /* Metro dependency 2 */
|
|
import * as ReactNativeModule from '../../../../by-id/module-00027-ReactNative.js'; /* Metro dependency 27 */
|
|
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 UseNavigationNativeModule from '../../../../design/components/Navigator/native/useNavigation.native.tsx'; /* Metro dependency 1484 */
|
|
import * as CreateStylesModule from '../../../../design/components/Styles/native/createStyles.tsx'; /* Metro dependency 4501 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as ButtonGroupNativeModule from '../../../../design/components/ButtonGroup/native/ButtonGroup.native.tsx'; /* Metro dependency 6261 */
|
|
import * as WumpTrashModule from '../../../../design/components/Illustration/native/redesign/generated/WumpTrash.tsx'; /* Metro dependency 14336 */
|
|
|
|
function _fun108504(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#108504, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:6, offset: 0x02323353, size: 243 bytes, params: 8, frame: 19
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
const env0_9 = (CreateStylesModule).createStyles(_fun108505);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/auth/native/components/AccountDisabledOrDeletionScheduled.tsx');
|
|
exports.default = AccountDisabledOrDeletionScheduled;
|
|
function _fun108505(a0) { // fn#108505, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:204, offset: 0x02323446, size: 222 bytes, params: 2, frame: 17
|
|
const object2 = {'display': 'flex', 'height': '100%', 'flex': 1};
|
|
const space = (importDefault(697) /* metro dependency 697: native */).space;
|
|
object2.paddingBottom = a0 ? space.PX_8 : space.PX_16;
|
|
const PX_16 = a0 ? 0 : (importDefault(697) /* metro dependency 697: native */).space.PX_16;
|
|
object2.paddingHorizontal = PX_16;
|
|
const BACKGROUND_BASE_LOW = a0 ? 'transparent' : (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
|
|
object2.backgroundColor = BACKGROUND_BASE_LOW;
|
|
object2.justifyContent = a0 ? 'space-between' : 'center';
|
|
return {container: object2, image: {'marginBottom': 32, 'alignSelf': 'center'}, title: {'textAlign': 'center',
|
|
'marginBottom': 8}, description: {'lineHeight': 18, 'marginBottom': 24, 'textAlign': 'center'}};
|
|
}
|
|
|
|
function AccountDisabledOrDeletionScheduled({handleLogin, onReset}) { // fn#108506, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:729, offset: 0x02323524, size: 888 bytes, params: 2, frame: 31
|
|
const value2 = (UseNavigationNativeModule).useNavigation();
|
|
const loginStatus = (require(566) /* metro dependency 566: flux */).useStateFromStores([AuthenticationStore],
|
|
function() {
|
|
return AuthenticationStore.getLoginStatus();
|
|
});
|
|
const binding = loginStatus;
|
|
const env0_4 = binding.useRef(null);
|
|
binding.useEffect(_fun108508, [loginStatus, value2]);
|
|
const value3 = binding.useCallback(_fun108509, [onReset]);
|
|
const value4 = binding.useCallback(_fun108510, [handleLogin]);
|
|
const styles = useStyles((UseWideAuthView)());
|
|
const ACCOUNT_DISABLED = LoginStates.ACCOUNT_DISABLED;
|
|
const value6 = loginStatus === ACCOUNT_DISABLED;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
const r17 = value6 ? Reflect.apply(string, intl, [t['j3rC+U']]) : Reflect.apply(string, intl, [t.ZFWofo]);
|
|
string = intl.string;
|
|
const r11 = value6 ? Reflect.apply(string, intl, [t['6eNTWe']]) : Reflect.apply(string, intl, [t['pCBti+']]);
|
|
const WumpTrash = (WumpTrashModule).WumpTrash;
|
|
const items3 = [
|
|
<WumpTrash style={styles.image} />,
|
|
];
|
|
const Text = (TextModule).Text;
|
|
items3[1] = (
|
|
<Text
|
|
style={styles.title}
|
|
accessibilityRole="header"
|
|
variant="heading-xl/extrabold"
|
|
color="mobile-text-heading-primary"
|
|
>
|
|
{r17}
|
|
</Text>
|
|
);
|
|
items3[2] = (
|
|
<Text
|
|
style={styles.description}
|
|
variant="text-sm/medium"
|
|
color="text-default"
|
|
>
|
|
{r11}
|
|
</Text>
|
|
);
|
|
const items2 = [
|
|
<View>
|
|
{items3}
|
|
</View>,
|
|
];
|
|
const ButtonGroup = (ButtonGroupNativeModule).ButtonGroup;
|
|
const Button = (ButtonNativeModule).Button;
|
|
string = intl.string;
|
|
const JhDw5o = (require(1244) /* metro dependency 1244: indexNative */).t.JhDw5o;
|
|
items2[1] = (
|
|
<View>
|
|
<ButtonGroup>
|
|
<Button
|
|
variant="primary"
|
|
text={Reflect.apply(string, intl, [JhDw5o])}
|
|
onPress={value3}
|
|
/>
|
|
<Button
|
|
variant="secondary"
|
|
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.v51oiN)}
|
|
onPress={value4}
|
|
/>
|
|
</ButtonGroup>
|
|
</View>
|
|
);
|
|
return (
|
|
<AuthFormView contentStyle={{flexGrow: 1}}>
|
|
<View style={styles.container}>
|
|
{items2}
|
|
</View>
|
|
</AuthFormView>
|
|
);
|
|
function _fun108508() { // fn#108508, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:919, offset: 0x023238af, size: 114 bytes, params: 1, frame: 11
|
|
var value2;
|
|
const current = env0_4.current;
|
|
let loginStatusBinding = loginStatus;
|
|
if (current !== loginStatusBinding) {
|
|
if (env0_4.current != null) {
|
|
loginStatusBinding = loginStatus;
|
|
value2 = environment.__proto__;
|
|
if (loginStatusBinding !== LoginStates.ACCOUNT_SCHEDULED_FOR_DELETION && loginStatus !== LoginStates.ACCOUNT_DISABLED) {
|
|
env0_2.pop();
|
|
}
|
|
} else {
|
|
env0_4.current = loginStatus;
|
|
}
|
|
}
|
|
}
|
|
|
|
function _fun108509() { // fn#108509, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1069, offset: 0x02323921, size: 64 bytes, params: 1, frame: 11
|
|
var value;
|
|
if (onReset == null) {
|
|
value = environment.__proto__;
|
|
value = importDefault(5076) /* metro dependency 5076: AuthenticationActionCreators */;
|
|
value.loginReset();
|
|
} else {
|
|
onReset();
|
|
}
|
|
}
|
|
|
|
function _fun108510() { // fn#108510, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:14532:1131, offset: 0x02323961, size: 60 bytes, params: 1, frame: 16
|
|
let value = environment.__proto__;
|
|
value = AuthenticationStore.getCredentials();
|
|
const login = value.login;
|
|
const password = value.password;
|
|
handleLogin(login, password === undefined ? '' : password, true);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun108504, 14335, [31, 27, 1226, 661, 33, 4501, 697, 1484, 566, 5076, 8973, 1244, 9001, 14336, 4573,
|
|
6261, 4578,
|
|
2]) /* metro module 14335, dependencies: [31, 27, 1226, 661, 33, 4501, 697, 1484, 566, 5076, 8973, 1244, 9001, 14336, 4573, 6261, 4578, 2] */;
|