190 lines
8.9 KiB
TypeScript
190 lines
8.9 KiB
TypeScript
/* Metro module 10489; source: modules/user_profile/native/UserProfileRemediatedNotice.tsx; dependencies: [31, 27, 3793, 661, 33, 4501, 697, 8496, 632, 4573, 1244, 8783, 2] */
|
|
import Native from '../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
|
|
import UserProfileSharedStyles from './UserProfileSharedStyles.tsx'; /* Metro dependency 8496 */
|
|
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 UseStateFromStoresModule from '../../../external/discord_common/js/packages/flux/useStateFromStores.tsx'; /* Metro dependency 632 */
|
|
import * as ConstantsModule from '../../../Constants.tsx'; /* Metro dependency 661 */
|
|
import * as TextModule from '../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun81161(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#81161, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:6, offset: 0x01e9c1dd, size: 316 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_6 = value.jsx;
|
|
const env0_7 = value.Fragment;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object2 = {};
|
|
const PX_12 = (Native).space.PX_12;
|
|
object2.padding = PX_12;
|
|
const PX_8 = (Native).space.PX_8;
|
|
object2.gap = PX_8;
|
|
object2.flexDirection = 'row';
|
|
object2.alignItems = 'center';
|
|
const env0_9 = Reflect.apply(createStyles, value, [{container: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/user_profile/native/UserProfileRemediatedNotice.tsx');
|
|
exports.default = RemediatedUserNotice;
|
|
function RemediatedUserNotice({user, style}) { // fn#81162, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:430, offset: 0x01e9c319, size: 551 bytes, params: 2, frame: 30
|
|
var r6;
|
|
var r0;
|
|
var value4;
|
|
const Text = (TextModule).Text;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var items2;
|
|
var jsxRuntimeEnv0_7Binding;
|
|
var items3;
|
|
var value;
|
|
const styles = useStyles();
|
|
const value2 = (UserProfileSharedStyles)();
|
|
const useStateFromStoresObject = UseStateFromStoresModule.useStateFromStoresObject;
|
|
const items = [RelationshipStore];
|
|
const {isPendingIncoming, isBlocked, isIgnored} = Reflect.apply(useStateFromStoresObject, UseStateFromStoresModule,
|
|
[items, function() {
|
|
var object = {};
|
|
var relationshipStoreBinding = RelationshipStore;
|
|
var userBinding = user;
|
|
object.isPendingIncoming = relationshipStoreBinding.getRelationshipType(userBinding.id) === RelationshipTypes.PENDING_INCOMING;
|
|
object.isBlocked = relationshipStoreBinding.isBlocked(userBinding.id);
|
|
object.isIgnored = relationshipStoreBinding.isIgnored(userBinding.id);
|
|
return object;
|
|
}]);
|
|
if (isBlocked) {
|
|
var viewProps = {style: [styles.container, value2.card, style]};
|
|
items2 = [
|
|
isBlocked && <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oC/fU6'])}</Text>,
|
|
|
|
|
|
];
|
|
if (isIgnored) {
|
|
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
value = (
|
|
<Text
|
|
variant="text-sm/semibold"
|
|
color="text-default"
|
|
lineClamp={1}
|
|
>
|
|
{intl.string(t.HXz5An)}
|
|
</Text>
|
|
);
|
|
items3 = [value];
|
|
items3[1] = (
|
|
<Text
|
|
variant="text-sm/semibold"
|
|
color="text-default"
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no"
|
|
>
|
|
{'•'}
|
|
</Text>
|
|
);
|
|
items3[2] = intl.format(t.PrtAqy, {unignoreHook: unignoreHook});
|
|
value = (
|
|
<>
|
|
{items3}
|
|
</>
|
|
);
|
|
r6 = value;
|
|
} else {
|
|
r6 = isIgnored;
|
|
}
|
|
items2[1] = r6;
|
|
value = (
|
|
<View {...viewProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
} else {
|
|
value4 = null;
|
|
if (isIgnored) {
|
|
if (isPendingIncoming) {
|
|
r0 = value4;
|
|
} else {
|
|
var viewProps = {style: [styles.container, value2.card, style]};
|
|
items2 = [
|
|
isBlocked && <Text variant="text-sm/semibold" color="text-default" lineClamp={1}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t['oC/fU6'])}</Text>,
|
|
|
|
|
|
|
|
|
|
];
|
|
if (isIgnored) {
|
|
jsxRuntimeEnv0_7Binding = jsxRuntimeEnv0_7;
|
|
value = (
|
|
<Text
|
|
variant="text-sm/semibold"
|
|
color="text-default"
|
|
lineClamp={1}
|
|
>
|
|
{intl.string(t.HXz5An)}
|
|
</Text>
|
|
);
|
|
items3 = [value];
|
|
items3[1] = (
|
|
<Text
|
|
variant="text-sm/semibold"
|
|
color="text-default"
|
|
accessibilityElementsHidden
|
|
importantForAccessibility="no"
|
|
>
|
|
{'•'}
|
|
</Text>
|
|
);
|
|
items3[2] = intl.format(t.PrtAqy, {unignoreHook: unignoreHook});
|
|
value = (
|
|
<>
|
|
{items3}
|
|
</>
|
|
);
|
|
r6 = value;
|
|
} else {
|
|
r6 = isIgnored;
|
|
}
|
|
items2[1] = r6;
|
|
value = (
|
|
<View {...viewProps}>
|
|
{items2}
|
|
</View>
|
|
);
|
|
r0 = value;
|
|
}
|
|
} else {
|
|
r0 = value4;
|
|
}
|
|
}
|
|
return r0;
|
|
function unignoreHook(a0) { // fn#81164, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:1257, owner: RemediatedUserNotice.unignoreHook, offset: 0x01e9c59f, size: 76 bytes, params: 2, frame: 14
|
|
const Text = (TextModule).Text;
|
|
return (
|
|
<Text
|
|
role="button"
|
|
variant="heading-sm/medium"
|
|
color="text-link"
|
|
onPress={onPress_81165}
|
|
>
|
|
{a0}
|
|
</Text>
|
|
);
|
|
function unignoreHookOnPress() { // fn#81165, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:10675:1344, owner: RemediatedUserNotice.unignoreHook.onPress, offset: 0x01e9c5eb, size: 57 bytes, params: 1, frame: 13
|
|
let value = environment.__proto__.__proto__;
|
|
value = importDefault(8783) /* metro dependency 8783: RelationshipActionCreators */;
|
|
return value.unignoreUser(user.id, 'UserProfileRemediatedNotice');
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun81161, 10489, [31, 27, 3793, 661, 33, 4501, 697, 8496, 632, 4573, 1244, 8783,
|
|
2]) /* metro module 10489, dependencies: [31, 27, 3793, 661, 33, 4501, 697, 8496, 632, 4573, 1244, 8783, 2] */;
|