Files
discord-decomp/sources/modules/safety_hub/native/AutomatedUnderageAppealActionSheet.tsx
T
2026-07-27 16:20:00 +03:00

180 lines
11 KiB
TypeScript

/* Metro module 11487; source: modules/safety_hub/native/AutomatedUnderageAppealActionSheet.tsx; dependencies: [31, 27, 11473, 5267, 33, 4501, 697, 1244, 566, 1585, 11486, 5263, 5074, 4080, 6275, 6277, 4573, 6231, 6238, 3853, 4578, 11480, 6766, 2] */
function _fun88007(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#88007, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:6, offset: 0x01fd0ef1, size: 871 bytes, params: 8, frame: 24
var object3;
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
const env0_3 = importAll(31) /* metro dependency 31 */;
const env0_4 = (require(27) /* metro dependency 27 */).View;
const safetyHubStore = importDefault(11473) /* metro dependency 11473: SafetyHubStore */;
let value = require(5267) /* metro dependency 5267: SafetyHubConstants */;
const env0_6 = value.AGE_APPEAL_ACTION_SHEET_NAME;
const env0_7 = value.SafetyHubLinks;
value = require(33) /* metro dependency 33 */;
const env0_8 = value.jsx;
const env0_9 = value.jsxs;
value = require(4501) /* metro dependency 4501: createStyles */;
const createStyles = value.createStyles;
object3 = {};
const object4 = {flex: 1};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object4.paddingHorizontal = PX_16;
let PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object4.paddingTop = PX_8;
object3.container = object4;
object3.header = {alignItems: 'center'};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object3.content = {flex: 1, gap: PX_16};
const PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object3.moreInfo = {gap: PX_4};
const object5 = {};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object5.marginTop = PX_12;
object5.textAlign = 'center';
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
object5.paddingBottom = PX_32;
object3.learnMore = object5;
PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object3.footer = {marginTop: PX_8};
const object7 = {'alignItems': 'center', 'justifyContent': 'center', 'width': 32, 'height': 32};
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
const BACKGROUND_MOD_SUBTLE = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_MOD_SUBTLE;
object7.backgroundColor = BACKGROUND_MOD_SUBTLE;
object3.number = object7;
const env0_10 = Reflect.apply(createStyles, value, [object3]);
object3 = {};
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
const string = intl.string;
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
object3.title = Reflect.apply(string, intl, [t['1+E7LP']]);
object3.description = intl.string(t['BXiat/']);
const items2 = [object3];
items2[1] = {title: intl.string(t.iMQXtK), description: intl.string(t.oQ0vwu)};
object3 = {title: intl.string(t['oY/z1Q'])};
object3.description = intl.string(t.wtj02W);
items2[2] = object3;
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/safety_hub/native/AutomatedUnderageAppealActionSheet.tsx');
exports.default = AutomatedUnderageAppealActionSheet;
}
function AutomatedUnderageAppealActionSheet({onClose, classificationId}) { // fn#88008, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1035, offset: 0x01fd1258, size: 1245 bytes, params: 2, frame: 34
const styles = useStyles();
const ageVerificationWebviewUrl = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getAgeVerificationWebviewUrl();
});
const env0_3 = ageVerificationWebviewUrl;
const isLoadingAgeVerification = (require(566) /* metro dependency 566: flux */).useStateFromStores([SafetyHubStore],
function() {
return SafetyHubStore.getIsLoadingAgeVerification();
});
const bottom = (importDefault(1585) /* metro dependency 1585: useSafeAreaInsetsNative */)().bottom;
const binding = env0_3;
binding.useEffect(_fun88013, [ageVerificationWebviewUrl, binding.useCallback(_fun88012,
[binding.useCallback(_fun88011, [onClose])])]);
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
const value4 = 425 + bottom;
const PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
const value5 = value4 + PX_16;
const PX_32 = (importDefault(697) /* metro dependency 697: native */).space.PX_32;
const BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
const object = {};
copyDataProperties(object, styles.content, undefined);
object['paddingBottom'] = bottom;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
let string = intl.string;
const items2 = [<View style={styles.header}><Text variant="heading-xl/bold" color="mobile-text-heading-primary">{Reflect.apply(string,
intl,
[(require(1244) /* metro dependency 1244: indexNative */).t['9SDLnj']])}</Text><Text variant="heading-md/medium" color="text-default">{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['yvx//1'])}</Text></View>];
const TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
items2[1] = <View><TableRowGroup hasIcons>{env0_11.map(_fun88014)}</TableRowGroup></View>;
const object2 = {};
string = intl.string;
const WPwp1b = (require(1244) /* metro dependency 1244: indexNative */).t.WPwp1b;
object2.title = Reflect.apply(string, intl, [WPwp1b]);
object2.hasIcons = false;
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const object3 = {'label': null, 'subLabel': null, 'onPress': null, 'arrow': true, 'start': true, 'end': true};
string = intl.string;
const N9WJMM = (require(1244) /* metro dependency 1244: indexNative */).t.N9WJMM;
object3.label = Reflect.apply(string, intl, [N9WJMM]);
string = intl.string;
const NHq382 = (require(1244) /* metro dependency 1244: indexNative */).t.NHq382;
object3.subLabel = Reflect.apply(string, intl, [NHq382]);
object3.onPress = function() {
return importDefault(dependencyMap[19]).openURL(SafetyHubLinks.AGE_VERIFICATION_LINK);
};
items2[2] = <View style={styles.moreInfo}><TableRowGroup {...object2}><TableRow {...object3} /></TableRowGroup></View>;
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
const button = <Button onPress={onPress_88016} loading={isLoadingAgeVerification} disabled={isLoadingAgeVerification} text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t['54b8V0'])} />;
const TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
const format = intl.format;
const ZbWsOF = (require(1244) /* metro dependency 1244: indexNative */).t.ZbWsOF;
const LEARN_MORE_UU_APPEAL_LINK = SafetyHubLinks.LEARN_MORE_UU_APPEAL_LINK;
items2[3] = <View style={styles.footer}>{button}<TextWithIOSLinkWorkaround variant="heading-sm/medium" color="text-subtle" style={styles.learnMore}>{Reflect.apply(format,
intl, [ZbWsOF, {learnMoreLink: LEARN_MORE_UU_APPEAL_LINK}])}</TextWithIOSLinkWorkaround></View>;
return (
<BottomSheet scrollable startHeight={value5 + PX_32}>
<BottomSheetScrollView style={styles.container}>
<View style={object}>
{items2}
</View>
</BottomSheetScrollView>
</BottomSheet>
);
}
function _fun88011() { // fn#88011, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1302, offset: 0x01fd175f, size: 60 bytes, params: 1, frame: 11
if (onClose != null) {
onClose();
}
const value = environment.__proto__;
(importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */).close();
}
function _fun88012() { // fn#88012, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1361, offset: 0x01fd179b, size: 67 bytes, params: 1, frame: 14
const value = environment.__proto__;
(importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */).success();
env0_4();
(importDefault(11486) /* metro dependency 11486: AutomatedUnderageAppealModalActionCreatorsNative */).start_verification_check();
}
function _fun88013() { // fn#88013, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:1452, offset: 0x01fd17de, size: 135 bytes, params: 1, frame: 17
var value2;
var defaultImport;
var showAgeVerification;
var object2;
if (ageVerificationWebviewUrl !== '') {
value2 = environment.__proto__;
defaultImport = importDefault(5263) /* metro dependency 5263: AgeVerificationActionCreatorsNative */;
showAgeVerification = defaultImport.showAgeVerification;
object2 = {};
object2.webviewUrl = ageVerificationWebviewUrl;
object2.onComplete = env0_5;
object2.entryPoint = (require(5074) /* metro dependency 5074: AgeVerificationAnalyticsUtils */).AgeVerificationModalEntryPoint.AUTOMATED_UNDERAGE_APPEALS;
Reflect.apply(showAgeVerification, defaultImport, [object2]);
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet(AGE_APPEAL_ACTION_SHEET_NAME);
}
}
function _fun88014({title, description}, a1) { // fn#88014, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:2208, offset: 0x01fd1865, size: 156 bytes, params: 3, frame: 20
const TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
return (
<TableRow
label={title}
subLabel={description}
icon={<View style={styles.number}><Text variant="heading-md/semibold" color="text-brand">{a1 + 1}</Text></View>}
key={a1}
/>
);
}
function AutomatedUnderageAppealActionSheetOnPress_88016() { // fn#88016, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11673:2780, owner: AutomatedUnderageAppealActionSheet.onPress, offset: 0x01fd1931, size: 45 bytes, params: 1, frame: 11
let value = environment.__proto__;
value = require(11480) /* metro dependency 11480: SafetyHubActionCreators */;
return value.requestSuspendedUserAgeVerification(classificationId);
}