102 lines
7.0 KiB
TypeScript
102 lines
7.0 KiB
TypeScript
/* Metro module 11947; source: modules/notifications/settings/native/MuteAppDmActionSheet.tsx; dependencies: [31, 27, 33, 4501, 697, 6275, 11759, 9216, 1244, 4573, 4578, 6613, 6610, 4080, 3857, 1305, 8194, 2] */
|
|
function _fun91694(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#91694, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:6, offset: 0x0206e06f, size: 422 bytes, params: 8, frame: 23
|
|
var object2;
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_3 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object2 = {};
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object2.sheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
|
object2.iconContainer = {'alignItems': 'center', 'marginBottom': 8};
|
|
object2.iconBackground = {'width': 48, 'height': 48};
|
|
object2.content = {padding: 16};
|
|
object2.headerText = {'textAlign': 'center', 'marginBottom': 8, 'paddingHorizontal': 16};
|
|
object2.infoText = {'textAlign': 'center', 'marginBottom': 16, 'paddingHorizontal': 16};
|
|
object2.dismissButtonContainer = {marginTop: 8};
|
|
const object3 = {'borderRadius': null, 'backgroundColor': null, 'height': 24, 'width': 24, 'padding': 4,
|
|
'alignContent': 'center'};
|
|
object3.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const BACKGROUND_FEEDBACK_NOTIFICATION = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_NOTIFICATION;
|
|
object3.backgroundColor = BACKGROUND_FEEDBACK_NOTIFICATION;
|
|
object2.mutedNotificationContainer = object3;
|
|
object2.mutedNotification = {'width': 16, 'height': 16};
|
|
const env0_6 = Reflect.apply(createStyles, value, [object2]);
|
|
(require(2) /* metro dependency 2 */).fileFinishedImporting('modules/notifications/settings/native/MuteAppDmActionSheet.tsx');
|
|
exports.default = MuteAppDMActionSheet;
|
|
}
|
|
|
|
function MuteAppDMActionSheet({channel}) { // fn#91695, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:837, offset: 0x0206e215, size: 674 bytes, params: 2, frame: 28
|
|
const styles = useStyles();
|
|
const BottomSheet = (require(6275) /* metro dependency 6275: BottomSheetNative */).BottomSheet;
|
|
let value = importDefault(11759) /* metro dependency 11759: ChatInputActionButton */;
|
|
const BellIcon = (require(9216) /* metro dependency 9216: BellIcon */).BellIcon;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
let string = intl.string;
|
|
value = <View style={styles.iconContainer}>{((Component) => <Component style={styles.iconBackground} IconComponent={BellIcon} active accessibilityLabel={Reflect.apply(string,
|
|
intl, [(require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL])} />)(value)}</View>;
|
|
const items2 = [value];
|
|
const Text = (require(4573) /* metro dependency 4573: Text */).Text;
|
|
items2[1] = <Text variant="heading-lg/bold" color="mobile-text-heading-primary" style={styles.headerText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL)}</Text>;
|
|
items2[2] = <Text variant="text-md/normal" color="text-default" style={styles.infoText}>{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.mscFJU)}</Text>;
|
|
const Button = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
items2[3] = <Button variant="destructive" text={intl.string((require(1244) /* metro dependency 1244: indexNative */).t.uAmAiL)} onPress={onPress_91696} />;
|
|
string = intl.string;
|
|
const WAI6xu = (require(1244) /* metro dependency 1244: indexNative */).t.WAI6xu;
|
|
items2[4] = <View style={styles.dismissButtonContainer}><Button variant="secondary" text={Reflect.apply(string,
|
|
intl, [WAI6xu])} onPress={onPress_91698} /></View>;
|
|
return (
|
|
<BottomSheet startExpanded backgroundStyles={styles.sheet}>
|
|
<View style={styles.content}>
|
|
{items2}
|
|
</View>
|
|
</BottomSheet>
|
|
);
|
|
}
|
|
|
|
function MuteAppDMActionSheetOnPress() { // fn#91696, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:1542, owner: MuteAppDMActionSheet.onPress, offset: 0x0206e4b7, size: 217 bytes, params: 1, frame: 21
|
|
var environment;
|
|
let value = environment.__proto__;
|
|
const defaultImport = importDefault(6613) /* metro dependency 6613: NotificationSettingsModalActionCreators */;
|
|
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
|
|
const id = channel.id;
|
|
const NotificationLabels = (require(6610) /* metro dependency 6610: NotificationSettingsUtils */).NotificationLabels;
|
|
const Muted = NotificationLabels.Muted;
|
|
Reflect.apply(updateChannelOverrideSettings, defaultImport, [null, id, {muted: true}, Muted]);
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
const open = value.open;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const EgGpkx = (require(1244) /* metro dependency 1244: indexNative */).t.EgGpkx;
|
|
Reflect.apply(open, value, [{key: 'NOTIFICATIONS_MUTED', content: Reflect.apply(string, intl, [EgGpkx]),
|
|
icon: icon_91697}]);
|
|
}
|
|
|
|
function MuteAppDMActionSheetOnPress_91698() { // fn#91698, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:2054, owner: MuteAppDMActionSheet.onPress, offset: 0x0206e616, size: 37 bytes, params: 1, frame: 11
|
|
const value = environment.__proto__;
|
|
(importDefault(4080) /* metro dependency 4080: ActionSheetActionCreators */).hideActionSheet();
|
|
}
|
|
|
|
function onPressIcon_91697() { // fn#91697, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:12133:1761, owner: MuteAppDMActionSheet.onPress.icon, offset: 0x0206e590, size: 134 bytes, params: 1, frame: 19
|
|
const stylesBinding = styles;
|
|
const mutedNotificationContainer = stylesBinding.mutedNotificationContainer;
|
|
const Icon = (require(1305) /* metro dependency 1305: native */).Icon;
|
|
const iconProps = {source: importDefault(8194) /* metro dependency 8194 */};
|
|
const WHITE = (importDefault(697) /* metro dependency 697: native */).unsafe_rawColors.WHITE;
|
|
iconProps.color = WHITE;
|
|
iconProps.style = stylesBinding.mutedNotification;
|
|
return (
|
|
<View style={mutedNotificationContainer}>
|
|
<Icon {...iconProps} />
|
|
</View>
|
|
);
|
|
}
|
|
|