135 lines
7.8 KiB
TypeScript
135 lines
7.8 KiB
TypeScript
/* Metro module 10950; source: modules/notifications/settings/native/NotificationSettingsMockMessage.tsx; dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 3995, 4017, 4504, 4507, 4573, 1244, 1305, 10951, 2] */
|
|
import Native from '../../../../external/discord_common/js/packages/tokens/native.tsx'; /* Metro dependency 697 */
|
|
import UserStore from '../../../../stores/UserStore.tsx'; /* Metro dependency 1878 */
|
|
import ReanimatedRexport from '../../../reanimated/ReanimatedRexport.tsx'; /* Metro dependency 4017 */
|
|
import Module10951 from '../../../../by-id/module-10951.js'; /* Metro dependency 10951 */
|
|
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 NativeModule from '../../../../design/void/native.tsx'; /* Metro dependency 1305 */
|
|
import * as TextModule from '../../../../design/components/Text/native/Text.tsx'; /* Metro dependency 4573 */
|
|
|
|
function _fun83932(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83932, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:6, offset: 0x01f2f092, size: 379 bytes, params: 8, frame: 22
|
|
const env0_0 = require;
|
|
const Object = global.Object;
|
|
Object.defineProperty(exports, '__esModule', {value: true});
|
|
let value = JsxRuntimeModule;
|
|
const env0_7 = value.jsx;
|
|
const env0_8 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
object = {};
|
|
const BACKGROUND_SURFACE_HIGH = (Native).colors.BACKGROUND_SURFACE_HIGH;
|
|
object.card = {'backgroundColor': null, 'overflow': 'hidden', 'borderRadius': 10, 'padding': 16,
|
|
backgroundColor: BACKGROUND_SURFACE_HIGH};
|
|
object.cardContent = {'display': 'flex', 'flexDirection': 'row'};
|
|
object.cardMessage = {'marginLeft': 12, 'maxWidth': 240};
|
|
const BACKGROUND_BASE_LOWEST = (Native).colors.BACKGROUND_BASE_LOWEST;
|
|
object.overlay = {'position': 'absolute', 'top': 0, 'left': 0, 'right': 0, 'bottom': 0,
|
|
backgroundColor: BACKGROUND_BASE_LOWEST};
|
|
const env0_9 = Reflect.apply(createStyles, value, [object]);
|
|
object = {code: 'function NotificationSettingsMockMessageTsx1(){const{withTiming,opacity,timingStandard}=this.__closure;return{opacity:withTiming(opacity.get(),timingStandard)};}'};
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMockMessage.tsx');
|
|
exports.default = NotificationSettingsMockMessage;
|
|
function NotificationSettingsMockMessage(a0) { // fn#83933, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:821, offset: 0x01f2f20d, size: 996 bytes, params: 2, frame: 29
|
|
var r14;
|
|
const Text = (TextModule).Text;
|
|
var items2;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const styles = useStyles();
|
|
const currentUser = (require(566) /* metro dependency 566: flux */).useStateFromStores([UserStore], function() {
|
|
return UserStore.getCurrentUser();
|
|
});
|
|
const r17 = (importDefault(3995) /* metro dependency 3995: UserUtils */).getName(currentUser) ?? 'Roka';
|
|
let notificationSetting = a0.notificationSetting;
|
|
const NO_MESSAGES = UserNotificationSettings.NO_MESSAGES;
|
|
const value4 = notificationSetting === NO_MESSAGES;
|
|
const value7 = (require(4017) /* metro dependency 4017: ReanimatedRexport */).useSharedValue(value4 ? 0.8 : 0);
|
|
const reanimatedRexportModule = require(4017) /* metro dependency 4017: ReanimatedRexport */;
|
|
const useAnimatedStyle = reanimatedRexportModule.useAnimatedStyle;
|
|
const NotificationSettingsMockMessage_2 = NotificationSettingsMockMessage_;
|
|
NotificationSettingsMockMessage_2.__closure = {withTiming: (require(4504) /* metro dependency 4504: timing */).withTiming,
|
|
opacity: value7, timingStandard: (require(4507) /* metro dependency 4507: timingPresets */).timingStandard};
|
|
NotificationSettingsMockMessage_2.__workletHash = 6531430956793;
|
|
NotificationSettingsMockMessage_2.__initData = env0_10;
|
|
const value8 = Reflect.apply(useAnimatedStyle, reanimatedRexportModule, [NotificationSettingsMockMessage_2]);
|
|
notificationSetting = a0.notificationSetting;
|
|
const ALL_MESSAGES = UserNotificationSettings.ALL_MESSAGES;
|
|
if (notificationSetting === ALL_MESSAGES) {
|
|
r14 = (
|
|
<Text variant="text-sm/medium" color="text-default">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WYyzI5)}
|
|
</Text>
|
|
);
|
|
} else {
|
|
items2 = [
|
|
<Text variant="text-sm/normal" color="text-link">
|
|
{'@'}
|
|
{r17}
|
|
{' '}
|
|
</Text>,
|
|
];
|
|
items2[1] = intl.string((require(1244) /* metro dependency 1244: indexNative */).t.WYyzI5);
|
|
r14 = (
|
|
<View>
|
|
<Text variant="text-sm/medium" color="text-default">
|
|
{items2}
|
|
</Text>
|
|
</View>
|
|
);
|
|
}
|
|
ReactModule.useEffect(_fun83936, [value7, value4]);
|
|
const Avatar = (NativeModule).Avatar;
|
|
const avatarProps = {source: Module10951};
|
|
const AvatarSizes = (NativeModule).AvatarSizes;
|
|
const LARGE_48 = AvatarSizes.LARGE_48;
|
|
avatarProps.size = LARGE_48;
|
|
const items3 = [
|
|
<View>
|
|
<Avatar {...avatarProps} />
|
|
</View>,
|
|
];
|
|
items3[1] = (
|
|
<View style={styles.cardMessage}>
|
|
<Text variant="text-sm/semibold">
|
|
{intl.string((require(1244) /* metro dependency 1244: indexNative */).t.qSq0tD)}
|
|
</Text>
|
|
{r14}
|
|
</View>
|
|
);
|
|
const view = (
|
|
<View style={styles.cardContent}>
|
|
{items3}
|
|
</View>
|
|
);
|
|
const View2 = (ReanimatedRexport).View;
|
|
return (
|
|
<View style={styles.card}>
|
|
{view}
|
|
<View2 style={[value8, styles.overlay]} />
|
|
</View>
|
|
);
|
|
function NotificationSettingsMockMessage_() { // fn#83935, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:1082, owner: NotificationSettingsMockMessage._, offset: 0x01f2f5f1, size: 78 bytes, params: 1, frame: 17
|
|
const object = {};
|
|
let value = environment.__proto__;
|
|
value = require(4504) /* metro dependency 4504: timing */;
|
|
object.opacity = value.withTiming(env0_1.get(),
|
|
(require(4507) /* metro dependency 4507: timingPresets */).timingStandard);
|
|
return object;
|
|
}
|
|
|
|
function _fun83936() { // fn#83936, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11136:1683, offset: 0x01f2f63f, size: 40 bytes, params: 1, frame: 12
|
|
const binding = env0_1;
|
|
binding.set(result ? 0.8 : 0);
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83932, 10950, [31, 27, 1878, 661, 33, 4501, 697, 566, 3995, 4017, 4504, 4507, 4573, 1244, 1305,
|
|
10951,
|
|
2]) /* metro module 10950, dependencies: [31, 27, 1878, 661, 33, 4501, 697, 566, 3995, 4017, 4504, 4507, 4573, 1244, 1305, 10951, 2] */;
|