90 lines
4.8 KiB
TypeScript
90 lines
4.8 KiB
TypeScript
/* Metro module 10943; source: modules/notifications/settings/native/NotificationSettingsMuteBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 4578, 1244, 2] */
|
|
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 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 */
|
|
|
|
function _fun83902(global, require, importDefault, importAll, module, exports, dependencyMap) { // fn#83902, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:6, offset: 0x01f2d835, size: 279 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_3 = value.jsx;
|
|
const env0_4 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object2 = {'padding': 16, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
|
'justifyContent': 'space-between'};
|
|
object2.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg + 8;
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object2.backgroundColor = BACKGROUND_BRAND;
|
|
const env0_5 = Reflect.apply(createStyles, value, [{card: object2}]);
|
|
(FileImportTrackerModule).fileFinishedImporting('modules/notifications/settings/native/NotificationSettingsMuteBanner.tsx');
|
|
exports.NotificationSettingsMuteBanner = NotificationSettingsMuteBanner;
|
|
exports.getMuteBannerSubtitleFromConfig = getMuteBannerSubtitleFromConfig;
|
|
function NotificationSettingsMuteBanner(a0) { // fn#83903, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:495, offset: 0x01f2d94c, size: 317 bytes, params: 2, frame: 23
|
|
const styles = useStyles();
|
|
const items2 = [a0.style];
|
|
items2[1] = styles.card;
|
|
const Text = (TextModule).Text;
|
|
let value = (
|
|
<Text variant="text-md/semibold" color="white">
|
|
{a0.title}
|
|
</Text>
|
|
);
|
|
value = (
|
|
<View style={{'flex': 1, 'marginRight': 8}}>
|
|
{value}
|
|
<Text variant="text-xs/medium" color="white">
|
|
{a0.subtitle}
|
|
</Text>
|
|
</View>
|
|
);
|
|
const Button = (ButtonNativeModule).Button;
|
|
const intl = (IndexNativeModule).intl;
|
|
const string = intl.string;
|
|
const YqAjXy = (IndexNativeModule).t.YqAjXy;
|
|
return (
|
|
<View style={items2}>
|
|
{value}
|
|
<Button
|
|
text={Reflect.apply(string, intl, [YqAjXy])}
|
|
onPress={a0.onPressUnmute}
|
|
variant="primary-overlay"
|
|
/>
|
|
</View>
|
|
);
|
|
}
|
|
|
|
function getMuteBannerSubtitleFromConfig(a0) { // fn#83904, source: /ci/build/discord/discord/discord_android_rn/android/app/src/main/assets/index.android.bundle:11129:944, offset: 0x01f2da89, size: 241 bytes, params: 2, frame: 20
|
|
var r0;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
var formatToPlainString;
|
|
const t = (require(1244) /* metro dependency 1244: indexNative */).t;
|
|
var C7m4oh;
|
|
var object;
|
|
var date;
|
|
if (a0?.end_time == null) {
|
|
r0 = intl.string(t['tFqP/P']);
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
C7m4oh = t.C7m4oh;
|
|
object = {};
|
|
date = new global.Date(a0.end_time);
|
|
object.endTime = date.toLocaleString((require(1244) /* metro dependency 1244: indexNative */).intl.currentLocale,
|
|
|
|
{'month': 'numeric', 'day': 'numeric', 'hour': 'numeric', 'minute': '2-digit'});
|
|
r0 = Reflect.apply(formatToPlainString, intl, [C7m4oh, object]);
|
|
}
|
|
return r0;
|
|
}
|
|
|
|
}
|
|
|
|
global.__d(_fun83902, 10943, [31, 27, 33, 4501, 697, 4573, 4578, 1244,
|
|
2]) /* metro module 10943, dependencies: [31, 27, 33, 4501, 697, 4573, 4578, 1244, 2] */;
|