71 lines
3.8 KiB
TypeScript
71 lines
3.8 KiB
TypeScript
/* Metro module 10943; source: modules/notifications/settings/native/NotificationSettingsMuteBanner.tsx; dependencies: [31, 27, 33, 4501, 697, 4573, 4578, 1244, 2] */
|
|
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});
|
|
importAll(31) /* metro dependency 31 */;
|
|
const env0_2 = (require(27) /* metro dependency 27 */).View;
|
|
let value = require(33) /* metro dependency 33 */;
|
|
const env0_3 = value.jsx;
|
|
const env0_4 = value.jsxs;
|
|
value = require(4501) /* metro dependency 4501: createStyles */;
|
|
const createStyles = value.createStyles;
|
|
const object = {'padding': 16, 'display': 'flex', 'flexDirection': 'row', 'alignItems': 'center',
|
|
'justifyContent': 'space-between'};
|
|
object.borderRadius = (importDefault(697) /* metro dependency 697: native */).radii.lg + 8;
|
|
const BACKGROUND_BRAND = (importDefault(697) /* metro dependency 697: native */).colors.BACKGROUND_BRAND;
|
|
object.backgroundColor = BACKGROUND_BRAND;
|
|
const env0_5 = Reflect.apply(createStyles, value, [{card: object}]);
|
|
(require(2) /* metro dependency 2 */).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 = (require(4573) /* metro dependency 4573: Text */).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 = (require(4578) /* metro dependency 4578: ButtonNative */).Button;
|
|
const intl = (require(1244) /* metro dependency 1244: indexNative */).intl;
|
|
const string = intl.string;
|
|
const YqAjXy = (require(1244) /* metro dependency 1244: indexNative */).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 object2;
|
|
var date;
|
|
if (a0?.end_time == null) {
|
|
r0 = intl.string(t['tFqP/P']);
|
|
} else {
|
|
formatToPlainString = intl.formatToPlainString;
|
|
C7m4oh = t.C7m4oh;
|
|
object2 = {};
|
|
date = new global.Date(a0.end_time);
|
|
object2.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, object2]);
|
|
}
|
|
return r0;
|
|
}
|
|
|