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

195 lines
12 KiB
TypeScript

/* Metro module 13437; source: modules/parent_tools/native/FamilyCenterPendingLinks.tsx; dependencies: [31, 27, 5117, 33, 4501, 697, 8170, 12627, 1244, 2224, 4573, 8171, 5278, 5080, 13438, 1962, 1305, 8096, 13439, 13436, 13440, 13431, 2] */
import FamilyCenterMessages from '../FamilyCenter.messages.js'; /* Metro dependency 2224 */
import UseIsInAdultAgeGroup from '../hooks/useIsInAdultAgeGroup.tsx'; /* Metro dependency 8171 */
import FamilyCenterLinkRow from './FamilyCenterLinkRow.tsx'; /* Metro dependency 13431 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as FamilyCenterConstantsModule from '../FamilyCenterConstants.tsx'; /* Metro dependency 5117 */
import * as PressablesModule from '../../../design/void/Pressables/native/Pressables.tsx'; /* Metro dependency 5278 */
import * as UseUserLinksModule from '../hooks/useUserLinks.tsx'; /* Metro dependency 8170 */
import * as UseAgeSpecificTextModule from '../hooks/useAgeSpecificText.tsx'; /* Metro dependency 12627 */
function _fun102183(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#102183, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:6, offset: 0x0223107d, size: 486 bytes, params: 8, frame: 23
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
ReactModule;
let value = JsxRuntimeModule;
const env0_5 = value.jsx;
const env0_6 = value.jsxs;
const env0_7 = value.Fragment;
value = require(4501) /* metro dependency 4501: createStyles */;
let createStyles = value.createStyles;
const object3 = {'display': 'flex', 'justifyContent': 'center'};
const BACKGROUND_BASE_LOW = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOW;
object3.backgroundColor = BACKGROUND_BASE_LOW;
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.md;
const env0_8 = Reflect.apply(createStyles, value, [{container: {marginTop: 24}, content: object3,
header: {marginBottom: 10}}]);
value = require(4501) /* metro dependency 4501: createStyles */;
createStyles = value.createStyles;
object = {};
const object5 = {'backgroundColor': null, 'tintColor': null, 'borderRadius': null, 'alignItems': 'center',
'justifyContent': 'center', 'height': 32, 'width': 32};
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object5.backgroundColor = BACKGROUND_SURFACE_HIGH;
const INTERACTIVE_TEXT_DEFAULT = (importDefault(697) /* metro dependency 697: native */).colors.INTERACTIVE_TEXT_DEFAULT;
object5.tintColor = INTERACTIVE_TEXT_DEFAULT;
object5.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.actionButton = object5;
const PX_8 = (importDefault(697) /* metro dependency 697: native */).space.PX_8;
object.actionButtonFirst = {marginRight: PX_8};
const env0_9 = Reflect.apply(createStyles, value, [object]);
(FileImportTrackerModule).fileFinishedImporting('modules/parent_tools/native/FamilyCenterPendingLinks.tsx');
exports.default = FamilyCenterPendingLinks;
function FamilyCenterPendingLinkRow({otherUser}) { // fn#102184, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:687, offset: 0x02231263, size: 941 bytes, params: 2, frame: 28
var r9;
var r4;
var jsxRuntimeEnv0_7Binding;
var value5;
const PressableOpacity = (PressablesModule).PressableOpacity;
const intl = (IndexNativeModule).intl;
var formatToPlainString;
var jc1Ip7;
var object3;
var items2;
var property;
var object5;
var oUpA6X;
var object6;
const styles = useStyles();
const value3 = (UseIsInAdultAgeGroup)();
const value4 = (UseUserLinksModule).useHasMaxConnections();
if (otherUser === undefined) {
return null;
}
if (value3) {
formatToPlainString = intl.formatToPlainString;
oUpA6X = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).oUpA6X;
object6 = {};
object6.name = otherUser?.toString();
r4 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [oUpA6X, object6])}
onPress={onPress_102185}
style={styles.actionButton}
>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</PressableOpacity>
);
} else {
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
value5 = null;
if (value4) {
r9 = value5;
} else {
formatToPlainString = intl.formatToPlainString;
jc1Ip7 = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */).jc1Ip7;
object3 = {};
object3.name = value5 == otherUser ? undefined : otherUser.toString();
r9 = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [jc1Ip7, object3])}
onPress={onPress_102186}
style={[styles.actionButton, styles.actionButtonFirst]}
>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(8096) /* metro dependency 8096 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</PressableOpacity>
);
}
items2 = [r9];
formatToPlainString = intl.formatToPlainString;
property = (importDefault(2224) /* metro dependency 2224: FamilyCenterMessages */)['4GtllP'];
object5 = {};
object5.name = value5 == otherUser ? undefined : otherUser.toString();
items2[1] = (
<PressableOpacity
accessibilityRole="button"
accessibilityLabel={Reflect.apply(formatToPlainString, intl, [property, object5])}
onPress={onPress_102187}
style={styles.actionButton}
>
{((Icon) => <Icon size={(require(1305) /* metro dependency 1305: native */).Icon.Sizes.SMALL} disableColor source={importDefault(13436) /* metro dependency 13436 */} />)((require(1305) /* metro dependency 1305: native */).Icon)}
</PressableOpacity>
);
r4 = (
<>
{items2}
</>
);
}
return ((Component) => <Component otherUser={otherUser} actions={r4} />)(FamilyCenterLinkRow);
function FamilyCenterPendingLinkRowOnPress() { // fn#102185, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:995, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x02231610, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[20], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function FamilyCenterPendingLinkRowOnPress_102186() { // fn#102186, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:1361, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x02231667, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[14], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
function FamilyCenterPendingLinkRowOnPress_102187() { // fn#102187, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:1730, owner: FamilyCenterPendingLinkRow.onPress, offset: 0x022316be, size: 87 bytes, params: 1, frame: 15
let value = environment.__proto__;
const defaultImport = importDefault(dependencyMap[13]);
const pushLazy = defaultImport.pushLazy;
value = require(dependencyMap[15]);
value = value(dependencyMap[18], dependencyMap.paths);
Reflect.apply(pushLazy, defaultImport, [value, {otherUser: otherUser}]);
}
}
function FamilyCenterPendingLinks() { // fn#102188, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:2054, offset: 0x02231715, size: 361 bytes, params: 1, frame: 25
const styles = useStyles();
const useUsersForLinkStatus = UseUserLinksModule.useUsersForLinkStatus;
const PENDING = UserLinkStatus.PENDING;
const value2 = Reflect.apply(useUsersForLinkStatus, UseUserLinksModule, [PENDING]);
const useAgeSpecificText = UseAgeSpecificTextModule.useAgeSpecificText;
const intl = (IndexNativeModule).intl;
let formatToPlainString = intl.formatToPlainString;
const IkAgkG = (FamilyCenterMessages).IkAgkG;
const value3 = Reflect.apply(formatToPlainString, intl, [IkAgkG, {count: value2.length}]);
formatToPlainString = intl.formatToPlainString;
const Q8XnAa = (FamilyCenterMessages).Q8XnAa;
({}).count = value2.length;
return (
value2.length === 0
? null
: (
<View style={styles.container}>
{((Text) => <Text style={styles.header} variant="eyebrow" color="text-default">{Reflect.apply(useAgeSpecificText,
UseAgeSpecificTextModule, [value3, Reflect.apply(formatToPlainString, intl, [Q8XnAa,
viewBindingProps])])}</Text>)((require(4573) /* metro dependency 4573: Text */).Text)}
<View style={styles.content}>
{value2.map(_fun102189)}
</View>
</View>
)
);
function _fun102189(a0) { // fn#102189, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:13627:2484, offset: 0x0223187e, size: 61 bytes, params: 2, frame: 16
const value = environment.__proto__;
return <FamilyCenterPendingLinkRow otherUser={a0} key={'pending-' + a0.id} />;
}
}
}
global.__d(_fun102183, 13437, [31, 27, 5117, 33, 4501, 697, 8170, 12627, 1244, 2224, 4573, 8171, 5278, 5080, 13438,
1962, 1305, 8096, 13439, 13436, 13440, 13431,
2]) /* metro module 13437, dependencies: [31, 27, 5117, 33, 4501, 697, 8170, 12627, 1244, 2224, 4573, 8171, 5278, 5080, 13438, 1962, 1305, 8096, 13439, 13436, 13440, 13431, 2] */;