/* Metro module 8794; source: modules/relationships/native/BlockConfirmationActionSheet.tsx; dependencies: [57, 31, 27, 1379, 3793, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231, 6238, 1305, 1585, 6771, 6789, 566, 8061, 6275, 683, 6277, 8747, 4573, 4617, 8748, 4080, 8793, 1962, 480, 4578, 8783, 6264, 6766, 1948, 3853, 2] */
import Module00057 from '../../../by-id/module-00057.js'; /* Metro dependency 57 */
import AnalyticsUtils from '../../../utils/AnalyticsUtils.tsx'; /* Metro dependency 683 */
import ChannelStore from '../../../stores/ChannelStore.tsx'; /* Metro dependency 1379 */
import UseSafeAreaInsetsNative from '../../safe_area/useSafeAreaInsets.native.tsx'; /* Metro dependency 1585 */
import UserStore from '../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
import HelpdeskUtils from '../../../utils/HelpdeskUtils.tsx'; /* Metro dependency 1948 */
import RelationshipStore from '../../../stores/RelationshipStore.tsx'; /* Metro dependency 3793 */
import Linking from '../../../lib/native/Linking.tsx'; /* Metro dependency 3853 */
import ActionSheetActionCreators from '../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
import SafetyToastsActionCreatorsNative from '../../safety_common/SafetyToastsActionCreators.native.tsx'; /* Metro dependency 6264 */
import UseAnalyticsLocations from '../../app_analytics/useAnalyticsLocations.tsx'; /* Metro dependency 6771 */
import AnalyticsLocation from '../../app_analytics/AnalyticsLocation.tsx'; /* Metro dependency 6789 */
import RelationshipActionCreators from '../../../actions/RelationshipActionCreators.tsx'; /* Metro dependency 8783 */
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 IndexNativeModule from '../../../intl/index.native.tsx'; /* Metro dependency 1244 */
import * as NativeModule from '../../../design/void/native.tsx'; /* Metro dependency 1305 */
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 TableRowGroupNativeModule from '../../../design/components/TableRow/native/TableRowGroup.native.tsx'; /* Metro dependency 6231 */
import * as TableRowNativeModule from '../../../design/components/TableRow/native/TableRow.native.tsx'; /* Metro dependency 6238 */
import * as RestrictionConfirmationConstantsModule from './RestrictionConfirmationConstants.tsx'; /* Metro dependency 8781 */
import * as RelationshipConstantsModule from '../RelationshipConstants.tsx'; /* Metro dependency 8784 */
function _fun68761(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#68761, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:6, offset: 0x01c5bf8a, size: 935 bytes, params: 8, frame: 25
const env0_0 = require;
const Object = global.Object;
Object.defineProperty(exports, '__esModule', {value: true});
let value = ReactModule;
const createStyles = CreateStylesModule.createStyles;
object = {button: {'alignContent': 'center', 'textAlign': 'center'}};
let PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.tableContainer = {marginBottom: PX_16};
const PX_24 = (importDefault(697) /* metro dependency 697: native */).space.PX_24;
object.otherOptions = {marginBottom: PX_24};
object.headerText = {textAlign: 'center'};
const object5 = {flex: 1};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingHorizontal = PX_16;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object5.paddingTop = PX_16;
object.container = object5;
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.header = {marginBottom: PX_16};
PX_16 = (importDefault(697) /* metro dependency 697: native */).space.PX_16;
object.avatarContainer = {'position': 'relative', 'alignSelf': 'center', marginBottom: PX_16};
const object7 = {'position': 'absolute', 'bottom': -8, 'right': -8};
let PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object7.padding = PX_4;
const BACKGROUND_SURFACE_HIGH = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_SURFACE_HIGH;
object7.backgroundColor = BACKGROUND_SURFACE_HIGH;
object7.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
object.avatarIconContainer = object7;
object.avatar = {alignSelf: 'center'};
const object8 = {textAlign: 'center'};
const PX_12 = (importDefault(697) /* metro dependency 697: native */).space.PX_12;
object8.marginTop = PX_12;
PX_4 = (importDefault(697) /* metro dependency 697: native */).space.PX_4;
object8.paddingBottom = PX_4;
object.footerText = object8;
const env0_16 = Reflect.apply(createStyles, CreateStylesModule, [object]);
const items2 = [{icon: importDefault(8745) /* metro dependency 8745 */, text: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.fjFJFV);
}, subtext: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t['8SIMPz']);
}, a11yLabel: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.qHsrGS);
}}];
items2[1] = {icon: importDefault(8745) /* metro dependency 8745 */, text: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.QCrmqS);
}, subtext: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.TKDMoN);
}, a11yLabel: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.WR1Mbe);
}};
items2[2] = {icon: importDefault(4070) /* metro dependency 4070 */, text: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t['lkm/a8']);
}, subtext: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t['8j3qaC']);
}, a11yLabel: function() {
return require(dependencyMap[13]).intl.string(require(dependencyMap[13]).t.lfrNw0);
}};
value = value.memo(BlockConfirmationActionSheet);
(FileImportTrackerModule).fileFinishedImporting('modules/relationships/native/BlockConfirmationActionSheet.tsx');
exports.default = value;
function BlockedInformationTable() { // fn#68762, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:1633, offset: 0x01c5c331, size: 79 bytes, params: 1, frame: 16
const TableRowGroup = (TableRowGroupNativeModule).TableRowGroup;
return (
{env0_17.map(_fun68763)}
);
function _fun68763(a0, a1) { // fn#68763, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:1729, offset: 0x01c5c380, size: 206 bytes, params: 3, frame: 22
const TableRow = (TableRowNativeModule).TableRow;
const length = env1_17.length;
const Icon = (NativeModule).Icon;
const Icon2 = (NativeModule).Icon;
const Sizes = Icon2.Sizes;
const MEDIUM = Sizes.MEDIUM;
return (
}
label={a0.text()}
subLabel={a0.subtext()}
accessible
accessibilityLabel={a0.a11yLabel()}
key={a1}
/>
);
}
}
function BlockConfirmationActionSheet({userId, channelId, onBlock, onIgnore, onSuccess}) { // fn#68773, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:1963, offset: 0x01c5c68e, size: 1895 bytes, params: 2, frame: 47
var r12;
var r0;
var AnalyticsLocationProvider;
var BottomSheet;
var object2;
var value9;
var space;
var PX_24;
var value10;
var object3;
var BottomSheetScrollView;
var items5;
const Text = (TextModule).Text;
var object9;
var headerText;
const intl = (IndexNativeModule).intl;
var format;
const t = (IndexNativeModule).t;
var CIbzHR;
var object10;
var string;
var items6;
var TableRowGroup;
var TableRow;
var Button;
var items7;
var TextWithIOSLinkWorkaround;
const styles = useStyles();
const bottom = (UseSafeAreaInsetsNative)().bottom;
let defaultImport = UseAnalyticsLocations;
const IGNORE_CONFIRMATION_ACTION_SHEET = (AnalyticsLocation).IGNORE_CONFIRMATION_ACTION_SHEET;
let object = [IGNORE_CONFIRMATION_ACTION_SHEET];
const analyticsLocations = defaultImport(object).analyticsLocations;
const binding = onSuccess;
const [property, env0_5] = onIgnore(binding.useState(false), 2);
const value4 = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
return UserStore.getUser(userId);
}, [userId]);
const value5 = (require(566) /* metro dependency 566: flux */).useStateFromStores([RelationshipStore], function() {
return RelationshipStore.isIgnored(userId);
}, [userId]);
const value6 = (require(566) /* metro dependency 566: flux */).useStateFromStores([ChannelStore], _fun68776,
[channelId]);
binding.useEffect(_fun68777, [value4, userId]);
if (value4 == null) {
r0 = null;
} else {
AnalyticsLocationProvider = (require(6771) /* metro dependency 6771: useAnalyticsLocations */).AnalyticsLocationProvider;
object = {value: analyticsLocations};
BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
object2 = {onDismiss: function() {
var defaultImport = importDefault(dependencyMap[24]);
var USER_REMEDIATION_ACTION = AnalyticEvents.USER_REMEDIATION_ACTION;
defaultImport.track(USER_REMEDIATION_ACTION, {action: UserRemediationAction.DISMISS_BLOCK,
location: 'user-profile-context-menu'});
}, scrollable: true};
value9 = (value5 ? 485 : RESTRICTION_CONFIRMATION_ACTION_SHEET_HEIGHT) + bottom;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_24 = space.PX_24;
value10 = value9 + PX_24;
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_24 = space.PX_24;
object2.startHeight = value10 + PX_24;
object3 = {};
space = (importDefault(697) /* metro dependency 697: native */).space;
PX_24 = space.PX_24;
object3.paddingBottom = PX_24 + bottom;
copyDataProperties(object3, styles.container, undefined);
object2.bodyStyles = object3;
BottomSheetScrollView = (require(6277) /* metro dependency 6277 */).BottomSheetScrollView;
var viewBindingProps2 = {style: styles.header};
items5 = [
{((Avatar) => )((require(1305) /* metro dependency 1305: native */).Avatar)}
{((Icon) => )((require(1305) /* metro dependency 1305: native */).Icon)}
,
];
object9 = {'style': null, 'variant': 'heading-xl/bold', 'color': 'mobile-text-heading-primary',
'accessibilityRole': 'header'};
headerText = styles.headerText;
object9.style = headerText;
format = intl.format;
CIbzHR = t.CIbzHR;
object10 = {};
object10.username = (importDefault(4617) /* metro dependency 4617: NicknameUtils */).getName(value6, channelId,
value4);
items5[1] = (
{Reflect.apply(format, intl, [CIbzHR, object10])}
);
headerText = styles.headerText;
string = intl.string;
items5[2] = (
{Reflect.apply(string, intl, [t.S70jou])}
);
items6 = [
{items5}
,
];
items6[1] = (
);
if (value5) {
r12 = !value5;
} else {
var viewBindingProps = {style: styles.otherOptions};
TableRowGroup = (require(6231) /* metro dependency 6231: TableRowGroupNative */).TableRowGroup;
var tableRowGroupProps = {title: intl.string(t['+BJTcB']), hasIcons: true};
TableRow = (require(6238) /* metro dependency 6238: TableRowNative */).TableRow;
r12 = (
)((require(1305) /* metro dependency 1305: native */).Icon)}
label={intl.string(t.hC8tcc)}
subLabel={intl.string(t.If89rE)}
accessibilityLabel={intl.string(t['8qGQsM'])}
onPress={onPress_68779}
arrow
/>
);
}
items6[2] = r12;
var viewBindingProps5 = {style: styles.button};
Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
string = intl.string;
items7 = [
,
];
TextWithIOSLinkWorkaround = (require(6766) /* metro dependency 6766: TextWithIOSLinkWorkaround */).TextWithIOSLinkWorkaround;
format = intl.format;
items7[1] = (
{Reflect.apply(format, intl, [t.CpTgBn, {articleLink: articleLink}])}
);
items6[3] = (
{items7}
);
r0 = (
{items6}
);
}
return r0;
function _fun68776() { // fn#68776, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:2356, offset: 0x01c5bcd7, size: 42 bytes, params: 1, frame: 11
const value = environment.__proto__;
return ChannelStore.getChannel(channelId)?.guild_id;
}
function _fun68777() { // fn#68777, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:2445, offset: 0x01c5ce10, size: 57 bytes, params: 1, frame: 12
var value2;
var moduleValue;
if (env0_6 == null) {
value2 = environment.__proto__;
moduleValue = require(8061) /* metro dependency 8061: UserActionCreators */;
moduleValue.getUser(userId);
}
}
function BlockConfirmationActionSheetOnPress() { // fn#68779, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:4022, owner: BlockConfirmationActionSheet.onPress, offset: 0x01c5ce93, size: 217 bytes, params: 1, frame: 21
const defaultImport = importDefault(dependencyMap[24]);
const track = defaultImport.track;
const USER_REMEDIATION_ACTION = AnalyticEvents.USER_REMEDIATION_ACTION;
const GOTO_IGNORE = UserRemediationAction.GOTO_IGNORE;
Reflect.apply(track, defaultImport, [USER_REMEDIATION_ACTION, {action: GOTO_IGNORE,
location: 'user-profile-context-menu'}]);
const defaultImport2 = importDefault(dependencyMap[30]);
const openLazy = defaultImport2.openLazy;
const value2 = require(dependencyMap[32])(dependencyMap[31], dependencyMap.paths);
object = {};
object.userId = userId;
object.channelId = channelId;
object.onSuccess = onSuccess;
object.onIgnore = onIgnore;
const ImpressionNames = require(dependencyMap[33]).ImpressionNames;
const IGNORE_USER_CONFIRMATION = ImpressionNames.IGNORE_USER_CONFIRMATION;
object.impressionName = IGNORE_USER_CONFIRMATION;
Reflect.apply(openLazy, defaultImport2, [value2, IGNORE_CONFIRMATION_ACTION_SHEET_KEY, object, 'replaceTopSheet']);
}
function BlockConfirmationActionSheetOnPress_68780() { // fn#68780, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:4453, owner: BlockConfirmationActionSheet.onPress, offset: 0x01c5cf6c, size: 158 bytes, params: 1, frame: 19
env0_5(true);
const defaultImport = RelationshipActionCreators;
const blockUser = defaultImport.blockUser;
const userIdBinding = userId;
const BLOCK_CONFIRMATION_ACTION_SHEET = (AnalyticsLocation).BLOCK_CONFIRMATION_ACTION_SHEET;
Reflect.apply(blockUser, defaultImport, [userIdBinding,
{location: BLOCK_CONFIRMATION_ACTION_SHEET}]).then(_fun68781);
if (onBlock != null) {
onBlock();
}
const track = AnalyticsUtils.track;
const BLOCK_USER_CONFIRMED = AnalyticEvents.BLOCK_USER_CONFIRMED;
Reflect.apply(track, AnalyticsUtils, [BLOCK_USER_CONFIRMED]);
function _fun68781() { // fn#68781, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:4544, offset: 0x01c5d00a, size: 98 bytes, params: 1, frame: 16
const value = environment.__proto__.__proto__;
const defaultImport = SafetyToastsActionCreatorsNative;
defaultImport.showBlockSuccessToast(userId, channelId);
if (onSuccess != null) {
onSuccess();
}
(ActionSheetActionCreators).hideActionSheet();
}
}
function BlockConfirmationActionSheetArticleLink() { // fn#68782, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:8979:4868, owner: BlockConfirmationActionSheet.articleLink, offset: 0x01c5d06c, size: 93 bytes, params: 1, frame: 14
const value = environment.__proto__;
(ActionSheetActionCreators).hideActionSheet();
const defaultImport2 = HelpdeskUtils;
const getArticleURL = defaultImport2.getArticleURL;
const STEALTH_REMEDIATION_FEATURE_GUIDE = HelpdeskArticles.STEALTH_REMEDIATION_FEATURE_GUIDE;
(Linking).openURL(Reflect.apply(getArticleURL, defaultImport2,
[STEALTH_REMEDIATION_FEATURE_GUIDE]));
}
}
}
global.__d(_fun68761, 8794, [57, 31, 27, 1379, 3793, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231,
6238, 1305, 1585, 6771, 6789, 566, 8061, 6275, 683, 6277, 8747, 4573, 4617, 8748, 4080, 8793, 1962, 480, 4578,
8783, 6264, 6766, 1948, 3853,
2]) /* metro module 8794, dependencies: [57, 31, 27, 1379, 3793, 1878, 8784, 8781, 661, 33, 4501, 697, 8745, 1244, 4070, 6231, 6238, 1305, 1585, 6771, 6789, 566, 8061, 6275, 683, 6277, 8747, 4573, 4617, 8748, 4080, 8793, 1962, 480, 4578, 8783, 6264, 6766, 1948, 3853, 2] */;