82 lines
3.5 KiB
TypeScript
82 lines
3.5 KiB
TypeScript
// Metro module 10319 (f10320).
|
|
import { View } from "react-native";
|
|
import { createStyles } from "../../../../design/components/Styles/native/createStyles";
|
|
import Module712 from "../../../../_bundle/Module712";
|
|
import { getPushNotificationSelectOptions } from "../utils/notificationSettingsPresetOptionUtils";
|
|
import { Text } from "../../../../design/components/Text/native/Text";
|
|
import { intl, t } from "../../../../intl/index.native";
|
|
import { PressableOpacity } from "../../../../design/void/Pressables/native/Pressables";
|
|
import NotificationSettingsMockMessage from "./NotificationSettingsMockMessage";
|
|
import { useGuildPresetSettings } from "../utils/notificationSettingsGuildFlagUtils";
|
|
import ActionSheetActionCreators from "../../../action_sheet/native/ActionSheetActionCreators";
|
|
import { useChannelPresetSettings } from "../utils/notficationSettingsChannelFlagUtils";
|
|
let useStyles;
|
|
const NotificationSettingsMessageNotification = function NotificationSettingsMessageNotification(props) {
|
|
let c17867_0 = props;
|
|
const styles = useStyles();
|
|
const r18 = getPushNotificationSelectOptions().find((item) => item.value === c17867_0.setting);
|
|
const r65 = [<View style={styles.header}>
|
|
<Text variant="text-sm/semibold" color="text-default" style={styles.headerTitle}>
|
|
{intl.string(t["1m22ZB"])}
|
|
</Text>
|
|
<Text variant="text-xs/semibold" color="text-default">
|
|
{props.context === "guild" ? intl.string(t["4bP2ZZ"]) : intl.string(t["R1j5+4"])}
|
|
</Text>
|
|
</View>, ,];
|
|
const r79 = [<NotificationSettingsMockMessage notificationSetting={props.setting} />, , ,];
|
|
let r85 = r18?.label;
|
|
if (r85 == null) {
|
|
r85 = "unset";
|
|
}
|
|
r79[1] = <Text variant="text-sm/medium" style={styles.label}>{r85}</Text>;
|
|
r79[2] = <PressableOpacity onPress={props.onCustomize}>
|
|
<Text variant="text-sm/semibold" style={styles.cta} color="text-brand">
|
|
{intl.string(t.yxiV9W)}
|
|
</Text>
|
|
</PressableOpacity>;
|
|
r65[1] = <PressableOpacity onPress={props.onCustomize} activeOpacity={0.6}>
|
|
<View style={styles.card}>{r79}</View>
|
|
</PressableOpacity>;
|
|
return <View style={props.style}>{r65}</View>;
|
|
};
|
|
useStyles = createStyles({
|
|
card: {
|
|
backgroundColor: Module712.colors.BACKGROUND_BASE_LOWEST,
|
|
borderColor: Module712.colors.BACKGROUND_MOD_SUBTLE,
|
|
borderRadius: 20,
|
|
borderWidth: 1,
|
|
padding: 14
|
|
},
|
|
cta: {
|
|
textAlign: "center",
|
|
marginTop: 4
|
|
},
|
|
label: {
|
|
textAlign: "center",
|
|
marginTop: 8
|
|
},
|
|
header: {
|
|
marginBottom: 8
|
|
},
|
|
headerTitle: {
|
|
marginBottom: 4
|
|
}
|
|
});
|
|
export default NotificationSettingsMessageNotification;
|
|
export function NotificationSettingsGuildMessageNotification(props) {
|
|
let c17868_0 = props;
|
|
return <NotificationSettingsMessageNotification context="guild" style={props.style} setting={useGuildPresetSettings(props.guildId).notification} onCustomize={() => {
|
|
ActionSheetActionCreators.openLazy(import("./NotificationSettingsMessageNotificationGuildActionSheet"), "MessageNotificationGuildActionSheet", {
|
|
guildId: c17868_0.guildId
|
|
});
|
|
}} />;
|
|
}
|
|
export function NotificationSettingsChannelMessageNotification(props) {
|
|
let c17869_0 = props;
|
|
return <NotificationSettingsMessageNotification context="channel" style={props.style} setting={useChannelPresetSettings(props.channel).notification} onCustomize={() => {
|
|
ActionSheetActionCreators.openLazy(import("./NotificationSettingsMessageNotificationChannelActionSheet"), "MessageNotificationChannelActionSheet", {
|
|
channel: c17869_0.channel
|
|
});
|
|
}} />;
|
|
}
|