Files
discord-decomp/sources/modules/people/native/ClearAllIncomingRequestsConfirmation.tsx
T
2026-07-28 01:06:53 +03:00

190 lines
11 KiB
TypeScript

/* Metro module 8791; source: modules/people/native/ClearAllIncomingRequestsConfirmation.tsx; dependencies: [57, 31, 27, 33, 4501, 697, 5080, 3856, 1244, 8783, 6618, 8792, 8196, 4573, 4578, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import ModalActionCreators from '../../../actions/ModalActionCreators.tsx'; /* Metro dependency 5080 */
import Module08196 from '../../../by-id/module-08196.js'; /* Metro dependency 8196 */
import RelationshipActionCreators from '../../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */
import TouchableHitBox from '../../../design/void/TouchableHitBox/native/TouchableHitBox.tsx'; /* Metro dependency 8792 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
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 SafeAreaViewModule from '../../../components_native/common/SafeAreaView.tsx'; /* Metro dependency 6618 */
function _fun68726(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68726, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:6, offset: 0x01c5a19b, size: 726 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactNativeModule;
const env0_5 = value.View;
const env0_6 = value.ScrollView;
value = require(33) /* metro dependency 33 */;
const env0_7 = value.jsx;
const env0_8 = value.Fragment;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object = {};
const object2 = {'display': 'flex', 'flexDirection': 'column', 'backgroundColor': null, 'height': '100%'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object2.backgroundColor = BACKGROUND_BASE_LOW;
let PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object2.paddingTop = PX_24;
object.root = object2;
object.closeButton = {'marginRight': 8, 'alignSelf': 'flex-end'};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.content = {flexGrow: 1, padding: PX_16};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.container = {'display': 'flex', 'flexDirection': 'column', 'height': '100%', marginTop: PX_24};
const object5 = {'flexGrow': 0, 'flexShrink': 1};
const BORDER_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BORDER_SUBTLE;
object5.backgroundColor = BORDER_SUBTLE;
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object5.paddingVertical = PX_24;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
object.footer = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.header = {'display': 'flex', 'alignItems': 'center', 'justifyContent': 'center', marginBottom: PX_16};
const object7 = {};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object7.marginTop = PX_16;
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.marginBottom = PX_4;
object.headerText = object7;
const object8 = {};
PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object8.padding = PX_24;
object8.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object8.backgroundColor = BACKGROUND_SURFACE_HIGH;
object.body = object8;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.noticeHeader = {marginBottom: PX_4};
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object.buttonWrapper = {marginBottom: PX_4};
const env0_10 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/people/native/ClearAllIncomingRequestsConfirmation.tsx');
exports.default = ClearAllIncomingRequestsConfirmationModal;
function ClearAllIncomingRequestsConfirmationModal({incomingPendingRequestCount}) { // fn#68727, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:1199, offset: 0x01c5a471, size: 1039 bytes, params: 2, frame: 40
const styles = useStyles();
const [property, env0_0] = Module00057(ReactModule.useState(false), 2);
const value6 = ReactModule.useCallback(_fun68730, [ReactModule.useCallback(_fun68728, []), ReactModule.useCallback(_fun68729,
[])]);
const SafeAreaPaddingView = (SafeAreaViewModule).SafeAreaPaddingView;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const touchableHitBox = (
<TouchableHitBox
accessibilityRole="button"
accessibilityLabel={Reflect.apply(string, intl,
[(require(1244) /* metro dependency 1244: indexNative */).t.cpT0Cq])}
source={Module08196}
style={[styles.closeButton]}
onPress={onPress_68731}
/>
);
const jsxRuntimeEnv0_8Binding = jsxRuntimeEnv0_8;
const Text = (TextModule).Text;
let value = (
<View style={styles.header}>
<Text style={styles.headerText} variant="text-lg/bold">
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.eVjfAu)}
</Text>
</View>
);
value = (
<ScrollView style={styles.content}>
<>
{value}
<View style={styles.body}>
<Text
style={styles.noticeHeader}
variant="text-xs/normal"
color="mobile-text-heading-primary"
>
{intl.format((require(1244) /* metro dependency 1244: indexNative */).t.jaXsA3,
{incomingRequestCount: incomingPendingRequestCount})}
</Text>
</View>
</>
</ScrollView>
);
const items4 = [value];
const SafeAreaPaddingView2 = (SafeAreaViewModule).SafeAreaPaddingView;
const Button = (ButtonNativeModule).Button;
string = intl.string;
const Eq9seb = (require(1244) /* metro dependency 1244: indexNative */).t.Eq9seb;
items4[1] = (
<View style={styles.footer}>
<SafeAreaPaddingView2 bottom>
<>
<View style={styles.buttonWrapper}>
<Button
disabled={property}
loading={property}
variant="destructive"
size="md"
text={Reflect.apply(string, intl, [Eq9seb])}
onPress={value6}
grow
/>
</View>
<View style={styles.buttonWrapper}>
<Button
variant="secondary"
size="md"
text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['ETE/oC'])}
onPress={(importDefault(5080) /* metro dependency 5080: ModalActionCreators */).pop}
grow
/>
</View>
</>
</SafeAreaPaddingView2>
</View>
);
return (
<SafeAreaPaddingView top>
<View style={styles.root}>
{touchableHitBox}
<View style={styles.container}>
{items4}
</View>
</View>
</SafeAreaPaddingView>
);
function _fun68728() { // fn#68728, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:1350, offset: 0x01c5a880, size: 51 bytes, params: 1, frame: 12
env0_0(false);
const value = environment.__proto__;
(ModalActionCreators).pop();
}
function _fun68729() { // fn#68729, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:1398, offset: 0x01c5a8b3, size: 99 bytes, params: 1, frame: 16
env0_0(false);
let value = environment.__proto__;
value = require(3856) /* metro dependency 3856: ToastUtils */;
const presentFailedToast = value.presentFailedToast;
const intl = (IndexNativeModule).intl;
const string = intl.string;
const R0RpRX = (IndexNativeModule).t.R0RpRX;
Reflect.apply(presentFailedToast, value, [Reflect.apply(string, intl, [R0RpRX])]);
}
function _fun68730() { // fn#68730, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:1498, offset: 0x01c5a916, size: 80 bytes, params: 1, frame: 13
env0_0(true);
(RelationshipActionCreators).clearPendingRelationships().then(env0_1).catch(env0_2);
}
function ClearAllIncomingRequestsConfirmationModalOnPress() { // fn#68731, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8976:1796, owner: ClearAllIncomingRequestsConfirmationModal.onPress, offset: 0x01c5a966, size: 37 bytes, params: 1, frame: 11
const value = environment.__proto__;
return (ModalActionCreators).pop();
}
}
}
global.__d(_fun68726, 8791, [57, 31, 27, 33, 4501, 697, 5080, 3856, 1244, 8783, 6618, 8792, 8196, 4573, 4578,
2]) /* metro module 8791, dependencies: [57, 31, 27, 33, 4501, 697, 5080, 3856, 1244, 8783, 6618, 8792, 8196, 4573, 4578, 2] */;