153 lines
9.3 KiB
TypeScript
153 lines
9.3 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] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import ActionSheetActionCreators from '../../../action_sheet/native/ActionSheetActionCreators.tsx'; /* Metro dependency 4080 */
|
|
import NotificationSettingsModalActionCreators from '../../../../actions/NotificationSettingsModalActionCreators.tsx'; /* Metro dependency 6613 */
|
|
import Module08194 from '../../../../by-id/module-08194.js'; /* Metro dependency 8194 */
|
|
import ChatInputActionButton from '../../../chat_input/native/action_buttons/ChatInputActionButton.tsx'; /* Metro dependency 11759 */
|
|
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
import * as ButtonNativeModule from '../../../../design/components/Button/native/Button.native.tsx'; /* Metro dependency 4578 */
|
|
import * as BottomSheetNativeModule from '../../../../design/components/Sheet/native/BottomSheet.native.tsx'; /* Metro dependency 6275 */
|
|
import * as NotificationSettingsUtilsModule from '../../../../utils/NotificationSettingsUtils.tsx'; /* Metro dependency 6610 */
|
|
import * as BellIconModule from '../../../../design/components/Icon/native/redesign/generated/BellIcon.tsx'; /* Metro dependency 9216 */
|
|
|
|
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
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
ReactModule;
|
|
let value = JsxRuntimeModule;
|
|
const env0_4 = value.jsx;
|
|
const env0_5 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_BASE_LOWEST = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BASE_LOWEST;
|
|
object.sheet = {backgroundColor: BACKGROUND_BASE_LOWEST};
|
|
object.iconContainer = {'alignItems': 'center', 'marginBottom': 8};
|
|
object.iconBackground = {'width': 48, 'height': 48};
|
|
object.content = {padding: 16};
|
|
object.headerText = {'textAlign': 'center', 'marginBottom': 8, 'paddingHorizontal': 16};
|
|
object.infoText = {'textAlign': 'center', 'marginBottom': 16, 'paddingHorizontal': 16};
|
|
object.dismissButtonContainer = {marginTop: 8};
|
|
const object4 = {'borderRadius': null, 'backgroundColor': null, 'height': 24, 'width': 24, 'padding': 4,
|
|
'alignContent': 'center'};
|
|
object4.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.round;
|
|
const BACKGROUND_FEEDBACK_NOTIFICATION = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_FEEDBACK_NOTIFICATION;
|
|
object4.backgroundColor = BACKGROUND_FEEDBACK_NOTIFICATION;
|
|
object.mutedNotificationContainer = object4;
|
|
object.mutedNotification = {'width': 16, 'height': 16};
|
|
const env0_6 = Reflect.apply(createStyles, value, [object]);
|
|
(FileImportTrackerModule).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 = (BottomSheetNativeModule).BottomSheet;
|
|
let value = ChatInputActionButton;
|
|
const BellIcon = (BellIconModule).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 = (TextModule).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 = (ButtonNativeModule).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 = NotificationSettingsModalActionCreators;
|
|
const updateChannelOverrideSettings = defaultImport.updateChannelOverrideSettings;
|
|
const id = channel.id;
|
|
const NotificationLabels = (NotificationSettingsUtilsModule).NotificationLabels;
|
|
const Muted = NotificationLabels.Muted;
|
|
Reflect.apply(updateChannelOverrideSettings, defaultImport, [null, id, {muted: true}, Muted]);
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
value = importDefault(3857) /* metro dependency 3857: ToastActionCreators */;
|
|
const open = value.open;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const EgGpkx = (IndexNativeModule).t.EgGpkx;
|
|
Reflect.apply(open, value, [{key: 'NOTIFICATIONS_MUTED', content: Reflect.apply(string, intl, [EgGpkx]),
|
|
icon: icon_91697}]);
|
|
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 = (NativeModule).Icon;
|
|
const iconProps = {source: Module08194};
|
|
const WHITE = (Native).unsafe_rawColors.WHITE;
|
|
iconProps.color = WHITE;
|
|
iconProps.style = stylesBinding.mutedNotification;
|
|
return (
|
|
<View style={mutedNotificationContainer}>
|
|
<Icon {...iconProps} />
|
|
</View>
|
|
);
|
|
}
|
|
|
|
}
|
|
|
|
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__;
|
|
(ActionSheetActionCreators).hideActionSheet();
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun91694, 11947, [31, 27, 33, 4501, 697, 6275, 11759, 9216, 1244, 4573, 4578, 6613, 6610, 4080, 3857,
|
|
1305, 8194,
|
|
2]) /* metro module 11947, dependencies: [31, 27, 33, 4501, 697, 6275, 11759, 9216, 1244, 4573, 4578, 6613, 6610, 4080, 3857, 1305, 8194, 2] */;
|